diff options
Diffstat (limited to 'activitypub.c')
| -rw-r--r-- | activitypub.c | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/activitypub.c b/activitypub.c index 4a04000..dee127d 100644 --- a/activitypub.c +++ b/activitypub.c | |||
| @@ -356,23 +356,27 @@ int timeline_request(snac *snac, char **id, xs_str **wrk, int level) | |||
| 356 | } | 356 | } |
| 357 | 357 | ||
| 358 | if (xs_match(type, POSTLIKE_OBJECT_TYPE)) { | 358 | if (xs_match(type, POSTLIKE_OBJECT_TYPE)) { |
| 359 | const char *actor = get_atto(object); | ||
| 360 | |||
| 361 | if (content_check("filter_reject.txt", object)) | 359 | if (content_check("filter_reject.txt", object)) |
| 362 | snac_log(snac, xs_fmt("timeline_request rejected by content %s", nid)); | 360 | snac_log(snac, xs_fmt("timeline_request rejected by content %s", nid)); |
| 363 | else { | 361 | else { |
| 364 | /* request (and drop) the actor for this entry */ | 362 | const char *actor = get_atto(object); |
| 365 | if (!xs_is_null(actor)) | 363 | |
| 366 | actor_request(snac, actor, NULL); | 364 | if (!xs_is_null(actor)) { |
| 365 | /* request (and drop) the actor for this entry */ | ||
| 366 | if (!valid_status(actor_request(snac, actor, NULL))) { | ||
| 367 | /* failed? retry later */ | ||
| 368 | enqueue_actor_refresh(snac, actor, 60); | ||
| 369 | } | ||
| 367 | 370 | ||
| 368 | /* does it have an ancestor? */ | 371 | /* does it have an ancestor? */ |
| 369 | char *in_reply_to = xs_dict_get(object, "inReplyTo"); | 372 | char *in_reply_to = xs_dict_get(object, "inReplyTo"); |
| 370 | 373 | ||
| 371 | /* store */ | 374 | /* store */ |
| 372 | timeline_add(snac, nid, object); | 375 | timeline_add(snac, nid, object); |
| 373 | 376 | ||
| 374 | /* recurse! */ | 377 | /* recurse! */ |
| 375 | timeline_request(snac, &in_reply_to, NULL, level + 1); | 378 | timeline_request(snac, &in_reply_to, NULL, level + 1); |
| 379 | } | ||
| 376 | } | 380 | } |
| 377 | } | 381 | } |
| 378 | } | 382 | } |