From 123c20efb1c63839a5a161893f728c20318d1557 Mon Sep 17 00:00:00 2001 From: Henri Dickson <90480431+alphatownsman@users.noreply.github.com> Date: Wed, 6 Dec 2023 13:08:41 -0500 Subject: [PATCH] When remote follows local, hold off sending Accept if remote identity is not fully fetched (#676) --- users/models/follow.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/users/models/follow.py b/users/models/follow.py index cd05fcf..a3959c9 100644 --- a/users/models/follow.py +++ b/users/models/follow.py @@ -17,7 +17,7 @@ logger = logging.getLogger(__name__) class FollowStates(StateGraph): unrequested = State(try_interval=600) pending_approval = State(externally_progressed=True) - accepting = State(try_interval=24 * 60 * 60) + accepting = State(try_interval=600) rejecting = State(try_interval=24 * 60 * 60) accepted = State(externally_progressed=True) undone = State(try_interval=24 * 60 * 60) @@ -92,6 +92,9 @@ class FollowStates(StateGraph): @classmethod def handle_accepting(cls, instance: "Follow"): if not instance.source.local: + # Don't send Accept if remote identity wasn't fetch yet + if not instance.source.inbox_uri: + return # send an Accept object to the source server try: instance.target.signed_request(