diff options
author | default <nobody@localhost> | 2022-09-28 21:09:50 +0200 |
---|---|---|
committer | default <nobody@localhost> | 2022-09-28 21:09:50 +0200 |
commit | c5a7a9c4751c339c6abb15f64c5c5b0cc28e2d62 (patch) | |
tree | 679cfb9e0858c2027e0bedc981ba970c944529c6 /activitypub.c | |
parent | 2be2c07e9c930fd4582feb3cb02162c8b3785000 (diff) |
Treat 410 Gone from actors specially.
Diffstat (limited to 'activitypub.c')
-rw-r--r-- | activitypub.c | 14 |
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) char *actor = xs_dict_get(msg, "actor"); char *type = xs_dict_get(msg, "type"); xs *actor_o = NULL; + int a_status; char *object, *utype; @@ -574,8 +575,17 @@ int process_message(snac *snac, char *msg, char *req) utype = "(null)"; /* bring the actor */ - if (!valid_status(actor_request(snac, actor, &actor_o))) { - snac_log(snac, xs_fmt("error requesting actor %s -- retry later", actor)); + a_status = actor_request(snac, actor, &actor_o); + + /* if it's a 410 Gone, it's a Delete crap that can be ignored */ + if (a_status == 410) { + return 1; + } + + if (!valid_status(a_status)) { + snac_log(snac, + xs_fmt("error requesting actor %s %d -- retry later", actor, a_status)); + return 0; } |