commit 4773d6c
default
·
2023-03-02 09:26:52 +0000 UTC
parent 987f1d2
Output to the shared inboxes only the public messages.
1 files changed,
+10,
-7
+10,
-7
1@@ -1101,19 +1101,22 @@ void process_user_queue_item(snac *snac, xs_dict *q_item)
2 if (strcmp(type, "message") == 0) {
3 xs_dict *msg = xs_dict_get(q_item, "message");
4 xs *rcpts = recipient_list(snac, msg, 1);
5- xs *shibx = inbox_list();
6 xs_set inboxes;
7 xs_list *p;
8- xs_str *v;
9 xs_str *actor;
10
11 xs_set_init(&inboxes);
12
13- /* send first to the collected inboxes */
14- p = shibx;
15- while (xs_list_iter(&p, &v)) {
16- if (xs_set_add(&inboxes, v) == 1)
17- enqueue_output(snac, msg, v, 0);
18+ /* if it's public, send first to the collected inboxes */
19+ if (is_msg_public(snac, msg)) {
20+ xs *shibx = inbox_list();
21+ xs_str *v;
22+
23+ p = shibx;
24+ while (xs_list_iter(&p, &v)) {
25+ if (xs_set_add(&inboxes, v) == 1)
26+ enqueue_output(snac, msg, v, 0);
27+ }
28 }
29
30 /* iterate now the recipients */