diff options
author | default <nobody@localhost> | 2022-12-16 07:51:10 +0100 |
---|---|---|
committer | default <nobody@localhost> | 2022-12-16 07:51:10 +0100 |
commit | e6c48cc96a50fc9f29981541ce22d2f8dd6bb490 (patch) | |
tree | 0d0e781e5fe8f2d012b739a630983c0cdb46665e /activitypub.c | |
parent | 25acaf178cc8a4112a5a150f5ee45bf69192cc0e (diff) |
In msg_note(), delete all cc recipients also in the to.
Diffstat (limited to 'activitypub.c')
-rw-r--r-- | activitypub.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/activitypub.c b/activitypub.c index a193ac9..356e51b 100644 --- a/activitypub.c +++ b/activitypub.c @@ -685,6 +685,15 @@ d_char *msg_note(snac *snac, char *content, char *rcpts, char *in_reply_to, char if (xs_list_len(to) == 0) to = xs_list_append(to, public_address); + /* delete all cc recipients that also are in the to */ + p = to; + while (xs_list_iter(&p, &v)) { + int i; + + if ((i = xs_list_in(cc, v)) != -1) + cc = xs_list_del(cc, i); + } + msg = xs_dict_append(msg, "attributedTo", snac->actor); msg = xs_dict_append(msg, "summary", ""); msg = xs_dict_append(msg, "content", fc1); |