diff options
author | default <nobody@localhost> | 2023-12-15 22:25:14 +0100 |
---|---|---|
committer | default <nobody@localhost> | 2023-12-15 22:25:14 +0100 |
commit | f32c7dd813df6276011f233e06bf465e8865603d (patch) | |
tree | d79d039434a5751f0d246af0d18681bf8c421a5d /activitypub.c | |
parent | 3e3dee8a2f8c95afeaafeb76610982b5ea9ada1a (diff) |
More tweaks to is_msg_for_me().
Diffstat (limited to 'activitypub.c')
-rw-r--r-- | activitypub.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activitypub.c b/activitypub.c index 5154ecc..1513be3 100644 --- a/activitypub.c +++ b/activitypub.c @@ -464,8 +464,7 @@ int is_msg_for_me(snac *snac, const xs_dict *c_msg) return 2; /* if it's by someone we don't follow, reject */ - if (!following_check(snac, xs_dict_get(c_msg, "actor"))) - return 0; + return following_check(snac, xs_dict_get(c_msg, "actor")); } /* if it's an Undo, it must be from someone we follow */ @@ -474,8 +473,9 @@ int is_msg_for_me(snac *snac, const xs_dict *c_msg) } /* if it's not a Create or Update, allow */ - if (!xs_match(type, "Create|Update")) + if (!xs_match(type, "Create|Update")) { return 1; + } xs_dict *msg = xs_dict_get(c_msg, "object"); xs *rcpts = recipient_list(snac, msg, 0); |