diff options
| author | 2024-03-11 09:53:20 +0100 | |
|---|---|---|
| committer | 2024-03-11 09:53:20 +0100 | |
| commit | 48941cfeaf2205b3159c727c8edeece846457efb (patch) | |
| tree | 46a9edee03023204ab0c3e28ea41207d642f4dff /activitypub.c | |
| parent | Also accept Article objects. (diff) | |
| download | snac2-48941cfeaf2205b3159c727c8edeece846457efb.tar.gz snac2-48941cfeaf2205b3159c727c8edeece846457efb.tar.xz snac2-48941cfeaf2205b3159c727c8edeece846457efb.zip | |
Also call content_check() from timeline_request().
Diffstat (limited to 'activitypub.c')
| -rw-r--r-- | activitypub.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/activitypub.c b/activitypub.c index e2a40c8..b6a07c9 100644 --- a/activitypub.c +++ b/activitypub.c | |||
| @@ -354,18 +354,22 @@ int timeline_request(snac *snac, char **id, xs_str **wrk, int level) | |||
| 354 | if (xs_match(type, "Note|Page|Article|Video")) { | 354 | if (xs_match(type, "Note|Page|Article|Video")) { |
| 355 | const char *actor = get_atto(object); | 355 | const char *actor = get_atto(object); |
| 356 | 356 | ||
| 357 | /* request (and drop) the actor for this entry */ | 357 | if (content_check("filter_reject.txt", object)) |
| 358 | if (!xs_is_null(actor)) | 358 | snac_log(snac, xs_fmt("timeline_request rejected by content %s", nid)); |
| 359 | actor_request(snac, actor, NULL); | 359 | else { |
| 360 | /* request (and drop) the actor for this entry */ | ||
| 361 | if (!xs_is_null(actor)) | ||
| 362 | actor_request(snac, actor, NULL); | ||
| 360 | 363 | ||
| 361 | /* does it have an ancestor? */ | 364 | /* does it have an ancestor? */ |
| 362 | char *in_reply_to = xs_dict_get(object, "inReplyTo"); | 365 | char *in_reply_to = xs_dict_get(object, "inReplyTo"); |
| 363 | 366 | ||
| 364 | /* store */ | 367 | /* store */ |
| 365 | timeline_add(snac, nid, object); | 368 | timeline_add(snac, nid, object); |
| 366 | 369 | ||
| 367 | /* recurse! */ | 370 | /* recurse! */ |
| 368 | timeline_request(snac, &in_reply_to, NULL, level + 1); | 371 | timeline_request(snac, &in_reply_to, NULL, level + 1); |
| 372 | } | ||
| 369 | } | 373 | } |
| 370 | } | 374 | } |
| 371 | } | 375 | } |