summaryrefslogtreecommitdiff
path: root/activitypub.c
diff options
context:
space:
mode:
authorGravatar default2024-12-31 08:06:48 +0100
committerGravatar default2024-12-31 08:06:48 +0100
commitc6fc02efe8520e26eeb5e79c03b7d61ab735d898 (patch)
tree7c56ff6ba2202945bca1e48b1f1a8c6ed104bc25 /activitypub.c
parentConvert to lowercase when checking for followed hashtags. (diff)
downloadpenes-snac2-c6fc02efe8520e26eeb5e79c03b7d61ab735d898.tar.gz
penes-snac2-c6fc02efe8520e26eeb5e79c03b7d61ab735d898.tar.xz
penes-snac2-c6fc02efe8520e26eeb5e79c03b7d61ab735d898.zip
Skip enqueue_output() to local users (already served by the local shared-inbox).
Diffstat (limited to 'activitypub.c')
-rw-r--r--activitypub.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/activitypub.c b/activitypub.c
index b0d5f01..e3a1f79 100644
--- a/activitypub.c
+++ b/activitypub.c
@@ -2428,15 +2428,18 @@ void process_user_queue_item(snac *snac, xs_dict *q_item)
2428 2428
2429 /* iterate the recipients */ 2429 /* iterate the recipients */
2430 xs_list_foreach(rcpts, actor) { 2430 xs_list_foreach(rcpts, actor) {
2431 xs *inbox = get_actor_inbox(actor, 1); 2431 /* local users were served by this_shared_inbox */
2432 if (!xs_startswith(actor, srv_baseurl)) {
2433 xs *inbox = get_actor_inbox(actor, 1);
2432 2434
2433 if (inbox != NULL) { 2435 if (inbox != NULL) {
2434 /* add to the set and, if it's not there, send message */ 2436 /* add to the set and, if it's not there, send message */
2435 if (xs_set_add(&inboxes, inbox) == 1) 2437 if (xs_set_add(&inboxes, inbox) == 1)
2436 enqueue_output(snac, msg, inbox, 0, 0); 2438 enqueue_output(snac, msg, inbox, 0, 0);
2439 }
2440 else
2441 snac_log(snac, xs_fmt("cannot find inbox for %s", actor));
2437 } 2442 }
2438 else
2439 snac_log(snac, xs_fmt("cannot find inbox for %s", actor));
2440 } 2443 }
2441 2444
2442 /* if it's a public note or question, send to the collected inboxes */ 2445 /* if it's a public note or question, send to the collected inboxes */