summaryrefslogtreecommitdiff
path: root/activitypub.c
diff options
context:
space:
mode:
authorGravatar default2022-12-16 07:51:10 +0100
committerGravatar default2022-12-16 07:51:10 +0100
commite6c48cc96a50fc9f29981541ce22d2f8dd6bb490 (patch)
tree0d0e781e5fe8f2d012b739a630983c0cdb46665e /activitypub.c
parentReplaced all calls to post() with enqueue_message(). (diff)
downloadsnac2-e6c48cc96a50fc9f29981541ce22d2f8dd6bb490.tar.gz
snac2-e6c48cc96a50fc9f29981541ce22d2f8dd6bb490.tar.xz
snac2-e6c48cc96a50fc9f29981541ce22d2f8dd6bb490.zip
In msg_note(), delete all cc recipients also in the to.
Diffstat (limited to 'activitypub.c')
-rw-r--r--activitypub.c9
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
685 if (xs_list_len(to) == 0) 685 if (xs_list_len(to) == 0)
686 to = xs_list_append(to, public_address); 686 to = xs_list_append(to, public_address);
687 687
688 /* delete all cc recipients that also are in the to */
689 p = to;
690 while (xs_list_iter(&p, &v)) {
691 int i;
692
693 if ((i = xs_list_in(cc, v)) != -1)
694 cc = xs_list_del(cc, i);
695 }
696
688 msg = xs_dict_append(msg, "attributedTo", snac->actor); 697 msg = xs_dict_append(msg, "attributedTo", snac->actor);
689 msg = xs_dict_append(msg, "summary", ""); 698 msg = xs_dict_append(msg, "summary", "");
690 msg = xs_dict_append(msg, "content", fc1); 699 msg = xs_dict_append(msg, "content", fc1);