commit c6fc02e

default  ·  2024-12-31 07:06:48 +0000 UTC
parent 066ce90
Skip enqueue_output() to local users (already served by the local shared-inbox).
1 files changed,  +10, -7
+10, -7
 1@@ -2428,15 +2428,18 @@ void process_user_queue_item(snac *snac, xs_dict *q_item)
 2 
 3         /* iterate the recipients */
 4         xs_list_foreach(rcpts, actor) {
 5-            xs *inbox = get_actor_inbox(actor, 1);
 6+            /* local users were served by this_shared_inbox */
 7+            if (!xs_startswith(actor, srv_baseurl)) {
 8+                xs *inbox = get_actor_inbox(actor, 1);
 9 
10-            if (inbox != NULL) {
11-                /* add to the set and, if it's not there, send message */
12-                if (xs_set_add(&inboxes, inbox) == 1)
13-                    enqueue_output(snac, msg, inbox, 0, 0);
14+                if (inbox != NULL) {
15+                    /* add to the set and, if it's not there, send message */
16+                    if (xs_set_add(&inboxes, inbox) == 1)
17+                        enqueue_output(snac, msg, inbox, 0, 0);
18+                }
19+                else
20+                    snac_log(snac, xs_fmt("cannot find inbox for %s", actor));
21             }
22-            else
23-                snac_log(snac, xs_fmt("cannot find inbox for %s", actor));
24         }
25 
26         /* if it's a public note or question, send to the collected inboxes */