summaryrefslogtreecommitdiff
path: root/activitypub.c
diff options
context:
space:
mode:
Diffstat (limited to 'activitypub.c')
-rw-r--r--activitypub.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/activitypub.c b/activitypub.c
index 311255f..d3475e8 100644
--- a/activitypub.c
+++ b/activitypub.c
@@ -706,11 +706,11 @@ int is_msg_for_me(snac *snac, const xs_dict *c_msg)
706 } 706 }
707 } 707 }
708 708
709 /* is this a tag we're following? */ 709 /* does this message contain a tag we are following? */
710 const xs_list *tags_in_msg = xs_dict_get(msg, "tag"); 710 const xs_list *fw_tags = xs_dict_get(snac->config, "followed_hashtags");
711 if (xs_type(tags_in_msg) == XSTYPE_LIST) { 711 if (xs_type(fw_tags) == XSTYPE_LIST) {
712 const xs_list *fw_tags = xs_dict_get(snac->config, "followed_hashtags"); 712 const xs_list *tags_in_msg = xs_dict_get(msg, "tag");
713 if (xs_type(fw_tags) == XSTYPE_LIST) { 713 if (xs_type(tags_in_msg) == XSTYPE_LIST) {
714 const xs_dict *te; 714 const xs_dict *te;
715 715
716 /* iterate the tags in the message */ 716 /* iterate the tags in the message */
@@ -2413,13 +2413,16 @@ void process_user_queue_item(snac *snac, xs_dict *q_item)
2413 xs *rcpts = recipient_list(snac, msg, 1); 2413 xs *rcpts = recipient_list(snac, msg, 1);
2414 xs_set inboxes; 2414 xs_set inboxes;
2415 const xs_str *actor; 2415 const xs_str *actor;
2416 int c;
2417 2416
2418 xs_set_init(&inboxes); 2417 xs_set_init(&inboxes);
2419 2418
2419 /* add this shared inbox first */
2420 xs *this_shared_inbox = xs_fmt("%s/shared-inbox", srv_baseurl);
2421 xs_set_add(&inboxes, this_shared_inbox);
2422 enqueue_output(snac, msg, this_shared_inbox, 0, 0);
2423
2420 /* iterate the recipients */ 2424 /* iterate the recipients */
2421 c = 0; 2425 xs_list_foreach(rcpts, actor) {
2422 while (xs_list_next(rcpts, &actor, &c)) {
2423 xs *inbox = get_actor_inbox(actor, 1); 2426 xs *inbox = get_actor_inbox(actor, 1);
2424 2427
2425 if (inbox != NULL) { 2428 if (inbox != NULL) {
@@ -2437,8 +2440,7 @@ void process_user_queue_item(snac *snac, xs_dict *q_item)
2437 xs *shibx = inbox_list(); 2440 xs *shibx = inbox_list();
2438 const xs_str *inbox; 2441 const xs_str *inbox;
2439 2442
2440 c = 0; 2443 xs_list_foreach(shibx, inbox) {
2441 while (xs_list_next(shibx, &inbox, &c)) {
2442 if (xs_set_add(&inboxes, inbox) == 1) 2444 if (xs_set_add(&inboxes, inbox) == 1)
2443 enqueue_output(snac, msg, inbox, 0, 0); 2445 enqueue_output(snac, msg, inbox, 0, 0);
2444 } 2446 }