From 935c09125da464d064ea9f72b947c5bc235f5328 Mon Sep 17 00:00:00 2001 From: default Date: Sun, 17 Dec 2023 15:58:13 +0100 Subject: [PATCH] More is_msg_for_me() tweaks. --- activitypub.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/activitypub.c b/activitypub.c index 5c2d1ab..f948edc 100644 --- a/activitypub.c +++ b/activitypub.c @@ -467,13 +467,13 @@ int is_msg_for_me(snac *snac, const xs_dict *c_msg) return following_check(snac, xs_dict_get(c_msg, "actor")); } - /* if it's an Undo, it must be from someone we follow */ - if (strcmp(type, "Undo") == 0) { + /* if it's an Undo or an Update, it must be from someone we follow */ + if (xs_match(type, "Undo|Update")) { 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")) { + /* if it's not a Create, allow as is */ + if (!xs_match(type, "Create")) { return 1; }