summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--activitypub.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/activitypub.c b/activitypub.c
index 0740d3d..fe3fd41 100644
--- a/activitypub.c
+++ b/activitypub.c
@@ -675,7 +675,7 @@ int is_msg_for_me(snac *snac, const xs_dict *c_msg)
675 675
676 if (pub_msg) { 676 if (pub_msg) {
677 /* a public message for someone we follow? (probably cc'ed) accept */ 677 /* a public message for someone we follow? (probably cc'ed) accept */
678 if (following_check(snac, v)) 678 if (strcmp(v, public_address) != 0 && following_check(snac, v))
679 return 5; 679 return 5;
680 } 680 }
681 else 681 else
@@ -1242,6 +1242,10 @@ xs_dict *msg_actor(snac *snac)
1242 if (xs_type(xs_dict_get(snac->config, "bot")) == XSTYPE_TRUE) 1242 if (xs_type(xs_dict_get(snac->config, "bot")) == XSTYPE_TRUE)
1243 msg = xs_dict_set(msg, "type", "Service"); 1243 msg = xs_dict_set(msg, "type", "Service");
1244 1244
1245 /* if it's named "relay", then identify as an "Application" */
1246 if (strcmp(snac->uid, "relay") == 0)
1247 msg = xs_dict_set(msg, "type", "Application");
1248
1245 /* add the header image, if there is one defined */ 1249 /* add the header image, if there is one defined */
1246 const char *header = xs_dict_get(snac->config, "header"); 1250 const char *header = xs_dict_get(snac->config, "header");
1247 if (!xs_is_null(header)) { 1251 if (!xs_is_null(header)) {
@@ -2773,11 +2777,12 @@ void process_queue_item(xs_dict *q_item)
2773 snac user; 2777 snac user;
2774 2778
2775 if (user_open(&user, v)) { 2779 if (user_open(&user, v)) {
2776 if (is_msg_for_me(&user, msg)) { 2780 int rsn = is_msg_for_me(&user, msg);
2781 if (rsn) {
2777 xs *fn = xs_fmt("%s/queue/%s.json", user.basedir, ntid); 2782 xs *fn = xs_fmt("%s/queue/%s.json", user.basedir, ntid);
2778 2783
2779 snac_debug(&user, 1, 2784 snac_debug(&user, 1,
2780 xs_fmt("enqueue_input (from shared inbox) %s", xs_dict_get(msg, "id"))); 2785 xs_fmt("enqueue_input (from shared inbox) %s [%d]", xs_dict_get(msg, "id"), rsn));
2781 2786
2782 if (link(tmpfn, fn) < 0) 2787 if (link(tmpfn, fn) < 0)
2783 srv_log(xs_fmt("link(%s, %s) error", tmpfn, fn)); 2788 srv_log(xs_fmt("link(%s, %s) error", tmpfn, fn));