Send to collected inboxes AFTER sending to explicit recipients.

This commit is contained in:
default 2023-03-03 06:04:40 +01:00
parent aaf6ff20c1
commit 45f490286a

View file

@ -1108,19 +1108,7 @@ void process_user_queue_item(snac *snac, xs_dict *q_item)
xs_set_init(&inboxes); xs_set_init(&inboxes);
/* if it's public, send first to the collected inboxes */ /* iterate the recipients */
if (is_msg_public(snac, msg)) {
xs *shibx = inbox_list();
xs_str *v;
p = shibx;
while (xs_list_iter(&p, &v)) {
if (xs_set_add(&inboxes, v) == 1)
enqueue_output(snac, msg, v, 0);
}
}
/* iterate now the recipients */
p = rcpts; p = rcpts;
while (xs_list_iter(&p, &actor)) { while (xs_list_iter(&p, &actor)) {
xs *inbox = get_actor_inbox(snac, actor); xs *inbox = get_actor_inbox(snac, actor);
@ -1134,6 +1122,18 @@ void process_user_queue_item(snac *snac, xs_dict *q_item)
snac_log(snac, xs_fmt("cannot find inbox for %s", actor)); snac_log(snac, xs_fmt("cannot find inbox for %s", actor));
} }
/* if it's public, send to the collected inboxes */
if (is_msg_public(snac, msg)) {
xs *shibx = inbox_list();
xs_str *inbox;
p = shibx;
while (xs_list_iter(&p, &inbox)) {
if (xs_set_add(&inboxes, inbox) == 1)
enqueue_output(snac, msg, inbox, 0);
}
}
xs_set_free(&inboxes); xs_set_free(&inboxes);
} }
else else