commit 45f4902

default  ·  2023-03-03 05:04:40 +0000 UTC
parent aaf6ff2
Send to collected inboxes AFTER sending to explicit recipients.
1 files changed,  +13, -13
+13, -13
 1@@ -1108,19 +1108,7 @@ void process_user_queue_item(snac *snac, xs_dict *q_item)
 2 
 3         xs_set_init(&inboxes);
 4 
 5-        /* if it's public, send first to the collected inboxes */
 6-        if (is_msg_public(snac, msg)) {
 7-            xs *shibx = inbox_list();
 8-            xs_str *v;
 9-
10-            p = shibx;
11-            while (xs_list_iter(&p, &v)) {
12-                if (xs_set_add(&inboxes, v) == 1)
13-                    enqueue_output(snac, msg, v, 0);
14-            }
15-        }
16-
17-        /* iterate now the recipients */
18+        /* iterate the recipients */
19         p = rcpts;
20         while (xs_list_iter(&p, &actor)) {
21             xs *inbox = get_actor_inbox(snac, actor);
22@@ -1134,6 +1122,18 @@ void process_user_queue_item(snac *snac, xs_dict *q_item)
23                 snac_log(snac, xs_fmt("cannot find inbox for %s", actor));
24         }
25 
26+        /* if it's public, send to the collected inboxes */
27+        if (is_msg_public(snac, msg)) {
28+            xs *shibx = inbox_list();
29+            xs_str *inbox;
30+
31+            p = shibx;
32+            while (xs_list_iter(&p, &inbox)) {
33+                if (xs_set_add(&inboxes, inbox) == 1)
34+                    enqueue_output(snac, msg, inbox, 0);
35+            }
36+        }
37+
38         xs_set_free(&inboxes);
39     }
40     else