summaryrefslogtreecommitdiff
path: root/activitypub.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2023-12-18 11:15:53 +0100
committerdefault <nobody@localhost>2023-12-18 11:15:53 +0100
commit45c5c71f9e8f0ae9155be947b7548ed211e1fa4b (patch)
tree8ffb66978f4ee6db0ba24230f2e6ffea163229f0 /activitypub.c
parentde6d61f66fd70feb2c0c7e7cce46413062968c31 (diff)
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)
return following_check(snac, actor);
}
- /* if it's an Undo, it must be from someone we follow */
+ /* if it's an Undo + Follow, it must be from someone we follow */
if (xs_match(type, "Undo")) {
return following_check(snac, actor);
}
+ /* if it's an Accept + Follow, it must be for a Follow we created */
+ if (xs_match(type, "Accept")) {
+ return following_check(snac, actor);
+ }
+
/* if it's not a Create or Update, allow as is */
if (!xs_match(type, "Create|Update")) {
return 1;