summaryrefslogtreecommitdiff
path: root/activitypub.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2023-03-03 06:04:40 +0100
committerdefault <nobody@localhost>2023-03-03 06:04:40 +0100
commit45f490286ac8dccb56607b0096cc8ec6878c78f6 (patch)
tree2ee1d48dc442de088da4e52808d72c8e7dd22568 /activitypub.c
parentaaf6ff20c1d93dcb4b055deff333e0d9bd705830 (diff)
Send to collected inboxes AFTER sending to explicit recipients.
Diffstat (limited to 'activitypub.c')
-rw-r--r--activitypub.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/activitypub.c b/activitypub.c
index 11fddf4..c6cf445 100644
--- a/activitypub.c
+++ b/activitypub.c
@@ -1108,19 +1108,7 @@ void process_user_queue_item(snac *snac, xs_dict *q_item)
xs_set_init(&inboxes);
- /* if it's public, send first to the collected inboxes */
- 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 */
+ /* iterate the recipients */
p = rcpts;
while (xs_list_iter(&p, &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));
}
+ /* 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);
}
else