diff options
author | default <nobody@localhost> | 2023-03-07 09:40:55 +0100 |
---|---|---|
committer | default <nobody@localhost> | 2023-03-07 09:40:55 +0100 |
commit | 23177e93954951a85af85d579db269372c9eae93 (patch) | |
tree | e2c3fbaf32d56cb2247f989c43303baa4cb2ada1 /activitypub.c | |
parent | 946c29773a1277f37ef41cd869170371d55783bd (diff) |
is_msg_for_me() also accepts msgs where a followed is cc'ed.
Diffstat (limited to 'activitypub.c')
-rw-r--r-- | activitypub.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/activitypub.c b/activitypub.c index 4e8abf1..dc0afcd 100644 --- a/activitypub.c +++ b/activitypub.c @@ -304,12 +304,16 @@ int is_msg_for_me(snac *snac, xs_dict *c_msg) xs_str *v; while(xs_list_iter(&p, &v)) { - /* explicitly for me? we're done */ + /* explicitly for me? accept */ if (strcmp(v, snac->actor) == 0) return 2; + + /* for someone we follow? (probably cc'ed) accept */ + if (following_check(snac, v)) + return 5; } - /* accept if it's from someone we follow */ + /* accept if it's by someone we follow */ char *atto = xs_dict_get(msg, "attributedTo"); if (!xs_is_null(atto) && following_check(snac, atto)) @@ -320,7 +324,7 @@ int is_msg_for_me(snac *snac, xs_dict *c_msg) if (!xs_is_null(irt)) { xs *r_msg = NULL; - /* try to get it */ + /* try to get the replied message */ if (valid_status(object_get(irt, &r_msg))) { atto = xs_dict_get(r_msg, "attributedTo"); |