From 51ed24be474c44f687c67ec66dc16e5d5c279e95 Mon Sep 17 00:00:00 2001 From: default Date: Wed, 28 Sep 2022 20:24:47 +0200 Subject: [PATCH] If an actor cannot be retrieved, move the message back to the queue. --- activitypub.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/activitypub.c b/activitypub.c index ca6bf52..20c734b 100644 --- a/activitypub.c +++ b/activitypub.c @@ -574,7 +574,12 @@ void process_message(snac *snac, char *msg, char *req) utype = "(null)"; /* bring the actor */ - actor_request(snac, actor, &actor_o); + if (!valid_status(actor_request(snac, actor, &actor_o))) { + /* error: re-enqueue to try later */ + enqueue_input(snac, msg, req); + snac_log(snac, xs_fmt("error requesting actor %s -- retry later", actor)); + return; + } /* check the signature */ /* ... */