From 3e3dee8a2f8c95afeaafeb76610982b5ea9ada1a Mon Sep 17 00:00:00 2001 From: default Date: Fri, 15 Dec 2023 21:43:34 +0100 Subject: [PATCH] Avoid propagating Undo messages innecesarily. --- activitypub.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/activitypub.c b/activitypub.c index 80b8a22..5154ecc 100644 --- a/activitypub.c +++ b/activitypub.c @@ -468,6 +468,11 @@ int is_msg_for_me(snac *snac, const xs_dict *c_msg) return 0; } + /* if it's an Undo, it must be from someone we follow */ + if (strcmp(type, "Undo") == 0) { + return following_check(snac, xs_dict_get(c_msg, "actor")); + } + /* if it's not a Create or Update, allow */ if (!xs_match(type, "Create|Update")) return 1;