summaryrefslogtreecommitdiff
path: root/activitypub.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2024-03-25 11:44:19 +0100
committerdefault <nobody@localhost>2024-03-25 11:44:19 +0100
commit5a8c4cac805d349b211e1fb53172702ec77eaa60 (patch)
tree1713c081626bcff271f6cb874198ad703316d383 /activitypub.c
parentabf4279000df446fb115b50d735d74475f0ec3f7 (diff)
Added an additional check for blocked instances.
Diffstat (limited to 'activitypub.c')
-rw-r--r--activitypub.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/activitypub.c b/activitypub.c
index 8f9e01a..3806353 100644
--- a/activitypub.c
+++ b/activitypub.c
@@ -311,6 +311,12 @@ int timeline_request(snac *snac, char **id, xs_str **wrk, int level)
if (level < MAX_CONVERSATION_LEVELS && !xs_is_null(*id)) {
xs *msg = NULL;
+ /* from a blocked instance? discard and break */
+ if (is_instance_blocked(*id)) {
+ snac_debug(snac, 1, xs_fmt("timeline_request blocked instance %s", *id));
+ return status;
+ }
+
/* is the object already there? */
if (!valid_status(object_get(*id, &msg))) {
/* no; download it */