From 980a407ebb244c049119a68d53dc6338c03470a0 Mon Sep 17 00:00:00 2001 From: jesopo Date: Sun, 15 Sep 2019 12:17:24 +0100 Subject: [PATCH] change follow accept/followback logic to involve our own actor --- modules/fediverse/ap_server.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/fediverse/ap_server.py b/modules/fediverse/ap_server.py index 1ade854b..0e0f5562 100644 --- a/modules/fediverse/ap_server.py +++ b/modules/fediverse/ap_server.py @@ -188,13 +188,15 @@ class Server(object): key_id = self._ap_keyid_url(event["url_for"]) private_key = self._private_key(key_id) + our_actor = ap_actor.Actor(self_id) + actor = ap_actor.Actor(new_follower) actor.load() accept = ap_activities.Accept(data["id"], data) - actor.inbox.send(accept, private_key) + actor.inbox.send(our_actor, accept, private_key follow_id = "data:%s" % str(uuid.uuid4()) - follow = ap_activities.Follow(follow_id, self_id) - actor.inbox.send(follow, private_key) + follow = ap_activities.Follow(follow_id, actor.url) + actor.inbox.send(our_actor, follow, private_key) else: event["response"].code = 404