From 60c2a50ed9a0efc8bbbdbeb48b4a96a1eb80f946 Mon Sep 17 00:00:00 2001 From: default Date: Mon, 11 Mar 2024 06:00:21 +0100 Subject: New function content_check(). --- activitypub.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'activitypub.c') diff --git a/activitypub.c b/activitypub.c index 1976012..22a12fa 100644 --- a/activitypub.c +++ b/activitypub.c @@ -1921,10 +1921,15 @@ int process_input_message(snac *snac, xs_dict *msg, xs_dict *req) snac_debug(snac, 0, xs_fmt("dropped reply %s to hidden post %s", id, in_reply_to)); } else { + if (content_check("filter_reject.txt", object)) { + snac_log(snac, xs_fmt("rejected by content %s", id)); + return 1; + } + timeline_request(snac, &in_reply_to, &wrk, 0); if (timeline_add(snac, id, object)) { - snac_log(snac, xs_fmt("new 'Note' %s %s", actor, id)); + snac_log(snac, xs_fmt("new '%s' %s %s", utype, actor, id)); do_notify = 1; } -- cgit v1.2.3