From 4d53a7b6f7f45f524313980461f5d2a6ef965949 Mon Sep 17 00:00:00 2001 From: default Date: Sat, 11 May 2024 19:16:54 +0200 Subject: In timeline_request(), call enqueue_actor_request on actor errors. --- activitypub.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) (limited to 'activitypub.c') diff --git a/activitypub.c b/activitypub.c index 301fd4c..280ac87 100644 --- a/activitypub.c +++ b/activitypub.c @@ -356,23 +356,27 @@ int timeline_request(snac *snac, char **id, xs_str **wrk, int level) } if (xs_match(type, "Note|Page|Article|Video")) { - const char *actor = get_atto(object); - if (content_check("filter_reject.txt", object)) snac_log(snac, xs_fmt("timeline_request rejected by content %s", nid)); else { - /* request (and drop) the actor for this entry */ - if (!xs_is_null(actor)) - actor_request(snac, actor, NULL); + const char *actor = get_atto(object); + + if (!xs_is_null(actor)) { + /* request (and drop) the actor for this entry */ + if (!valid_status(actor_request(snac, actor, NULL))) { + /* failed? retry later */ + enqueue_actor_refresh(snac, actor, 60); + } - /* does it have an ancestor? */ - char *in_reply_to = xs_dict_get(object, "inReplyTo"); + /* does it have an ancestor? */ + char *in_reply_to = xs_dict_get(object, "inReplyTo"); - /* store */ - timeline_add(snac, nid, object); + /* store */ + timeline_add(snac, nid, object); - /* recurse! */ - timeline_request(snac, &in_reply_to, NULL, level + 1); + /* recurse! */ + timeline_request(snac, &in_reply_to, NULL, level + 1); + } } } } -- cgit v1.2.3