summaryrefslogtreecommitdiff
path: root/activitypub.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2024-03-11 09:53:20 +0100
committerdefault <nobody@localhost>2024-03-11 09:53:20 +0100
commit48941cfeaf2205b3159c727c8edeece846457efb (patch)
tree46a9edee03023204ab0c3e28ea41207d642f4dff /activitypub.c
parentbb28b1c090b991093ce0640de6b739946589368a (diff)
Also call content_check() from timeline_request().
Diffstat (limited to 'activitypub.c')
-rw-r--r--activitypub.c22
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)
if (xs_match(type, "Note|Page|Article|Video")) {
const char *actor = get_atto(object);
- /* request (and drop) the actor for this entry */
- if (!xs_is_null(actor))
- actor_request(snac, actor, NULL);
+ 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);
- /* 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);
+ }
}
}
}