commit 51ed24be474c44f687c67ec66dc16e5d5c279e95
parent e4967cfcb375d9611001e0e78be31e9c915a85b6
Author: default <nobody@localhost>
Date: Wed, 28 Sep 2022 20:24:47 +0200
If an actor cannot be retrieved, move the message back to the queue.
Diffstat:
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git 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 */
/* ... */