summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)
1108 1108
1109 xs_set_init(&inboxes); 1109 xs_set_init(&inboxes);
1110 1110
1111 /* if it's public, send first to the collected inboxes */ 1111 /* iterate the recipients */
1112 if (is_msg_public(snac, msg)) {
1113 xs *shibx = inbox_list();
1114 xs_str *v;
1115
1116 p = shibx;
1117 while (xs_list_iter(&p, &v)) {
1118 if (xs_set_add(&inboxes, v) == 1)
1119 enqueue_output(snac, msg, v, 0);
1120 }
1121 }
1122
1123 /* iterate now the recipients */
1124 p = rcpts; 1112 p = rcpts;
1125 while (xs_list_iter(&p, &actor)) { 1113 while (xs_list_iter(&p, &actor)) {
1126 xs *inbox = get_actor_inbox(snac, actor); 1114 xs *inbox = get_actor_inbox(snac, actor);
@@ -1134,6 +1122,18 @@ void process_user_queue_item(snac *snac, xs_dict *q_item)
1134 snac_log(snac, xs_fmt("cannot find inbox for %s", actor)); 1122 snac_log(snac, xs_fmt("cannot find inbox for %s", actor));
1135 } 1123 }
1136 1124
1125 /* if it's public, send to the collected inboxes */
1126 if (is_msg_public(snac, msg)) {
1127 xs *shibx = inbox_list();
1128 xs_str *inbox;
1129
1130 p = shibx;
1131 while (xs_list_iter(&p, &inbox)) {
1132 if (xs_set_add(&inboxes, inbox) == 1)
1133 enqueue_output(snac, msg, inbox, 0);
1134 }
1135 }
1136
1137 xs_set_free(&inboxes); 1137 xs_set_free(&inboxes);
1138 } 1138 }
1139 else 1139 else