summaryrefslogtreecommitdiff
path: root/activitypub.c
diff options
context:
space:
mode:
authorGravatar default2022-09-28 21:09:50 +0200
committerGravatar default2022-09-28 21:09:50 +0200
commitc5a7a9c4751c339c6abb15f64c5c5b0cc28e2d62 (patch)
tree679cfb9e0858c2027e0bedc981ba970c944529c6 /activitypub.c
parentThe input queue also has retries. (diff)
downloadsnac2-c5a7a9c4751c339c6abb15f64c5c5b0cc28e2d62.tar.gz
snac2-c5a7a9c4751c339c6abb15f64c5c5b0cc28e2d62.tar.xz
snac2-c5a7a9c4751c339c6abb15f64c5c5b0cc28e2d62.zip
Treat 410 Gone from actors specially.
Diffstat (limited to 'activitypub.c')
-rw-r--r--activitypub.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/activitypub.c b/activitypub.c
index 8127e8d..51ae6fa 100644
--- a/activitypub.c
+++ b/activitypub.c
@@ -564,6 +564,7 @@ int process_message(snac *snac, char *msg, char *req)
564 char *actor = xs_dict_get(msg, "actor"); 564 char *actor = xs_dict_get(msg, "actor");
565 char *type = xs_dict_get(msg, "type"); 565 char *type = xs_dict_get(msg, "type");
566 xs *actor_o = NULL; 566 xs *actor_o = NULL;
567 int a_status;
567 568
568 char *object, *utype; 569 char *object, *utype;
569 570
@@ -574,8 +575,17 @@ int process_message(snac *snac, char *msg, char *req)
574 utype = "(null)"; 575 utype = "(null)";
575 576
576 /* bring the actor */ 577 /* bring the actor */
577 if (!valid_status(actor_request(snac, actor, &actor_o))) { 578 a_status = actor_request(snac, actor, &actor_o);
578 snac_log(snac, xs_fmt("error requesting actor %s -- retry later", actor)); 579
580 /* if it's a 410 Gone, it's a Delete crap that can be ignored */
581 if (a_status == 410) {
582 return 1;
583 }
584
585 if (!valid_status(a_status)) {
586 snac_log(snac,
587 xs_fmt("error requesting actor %s %d -- retry later", actor, a_status));
588
579 return 0; 589 return 0;
580 } 590 }
581 591