summaryrefslogtreecommitdiff
path: root/activitypub.c
diff options
context:
space:
mode:
authorGravatar default2023-12-18 11:15:53 +0100
committerGravatar default2023-12-18 11:15:53 +0100
commit45c5c71f9e8f0ae9155be947b7548ed211e1fa4b (patch)
tree8ffb66978f4ee6db0ba24230f2e6ffea163229f0 /activitypub.c
parentAlso strip cgi variables (things after ?) in key request for checking. (diff)
downloadsnac2-45c5c71f9e8f0ae9155be947b7548ed211e1fa4b.tar.gz
snac2-45c5c71f9e8f0ae9155be947b7548ed211e1fa4b.tar.xz
snac2-45c5c71f9e8f0ae9155be947b7548ed211e1fa4b.zip
Fixed Accept + Follow for shared inboxes.
Diffstat (limited to 'activitypub.c')
-rw-r--r--activitypub.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/activitypub.c b/activitypub.c
index 720e83a..ff568c8 100644
--- a/activitypub.c
+++ b/activitypub.c
@@ -468,11 +468,16 @@ int is_msg_for_me(snac *snac, const xs_dict *c_msg)
468 return following_check(snac, actor); 468 return following_check(snac, actor);
469 } 469 }
470 470
471 /* if it's an Undo, it must be from someone we follow */ 471 /* if it's an Undo + Follow, it must be from someone we follow */
472 if (xs_match(type, "Undo")) { 472 if (xs_match(type, "Undo")) {
473 return following_check(snac, actor); 473 return following_check(snac, actor);
474 } 474 }
475 475
476 /* if it's an Accept + Follow, it must be for a Follow we created */
477 if (xs_match(type, "Accept")) {
478 return following_check(snac, actor);
479 }
480
476 /* if it's not a Create or Update, allow as is */ 481 /* if it's not a Create or Update, allow as is */
477 if (!xs_match(type, "Create|Update")) { 482 if (!xs_match(type, "Create|Update")) {
478 return 1; 483 return 1;