summaryrefslogtreecommitdiff
path: root/activitypub.c
diff options
context:
space:
mode:
authorGravatar default2023-12-28 09:26:08 +0100
committerGravatar default2023-12-28 09:26:08 +0100
commit3414ab48c6b97cfd358472f0dc87b6d28387b4b4 (patch)
tree48829d626eb73c3b6d4bf14b247800c14efb1ac4 /activitypub.c
parentIn xs_fcgi_response(), don't add the b_size to the total size if body is NULL. (diff)
downloadsnac2-3414ab48c6b97cfd358472f0dc87b6d28387b4b4.tar.gz
snac2-3414ab48c6b97cfd358472f0dc87b6d28387b4b4.tar.xz
snac2-3414ab48c6b97cfd358472f0dc87b6d28387b4b4.zip
In 'Follow', ensure the actor object to be followed is here.
Due to the routing change made for the shared inboxes, local users are not in the data storage, so this fixes it.
Diffstat (limited to 'activitypub.c')
-rw-r--r--activitypub.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/activitypub.c b/activitypub.c
index c6e4b26..2dd1358 100644
--- a/activitypub.c
+++ b/activitypub.c
@@ -1624,6 +1624,13 @@ int process_input_message(snac *snac, xs_dict *msg, xs_dict *req)
1624 1624
1625 if (strcmp(type, "Follow") == 0) { /** **/ 1625 if (strcmp(type, "Follow") == 0) { /** **/
1626 if (!follower_check(snac, actor)) { 1626 if (!follower_check(snac, actor)) {
1627 /* ensure the actor object is here */
1628 if (!object_here(actor)) {
1629 xs *actor_obj = NULL;
1630 actor_request(snac, actor, &actor_obj);
1631 object_add(actor, actor_obj);
1632 }
1633
1627 xs *f_msg = xs_dup(msg); 1634 xs *f_msg = xs_dup(msg);
1628 xs *reply = msg_accept(snac, f_msg, actor); 1635 xs *reply = msg_accept(snac, f_msg, actor);
1629 1636