Skip to content

Commit

Permalink
When remote follows local, hold off sending Accept if remote identity…
Browse files Browse the repository at this point in the history
… is not fully fetched (#676)
  • Loading branch information
alphatownsman authored Dec 6, 2023
1 parent 8360777 commit 123c20e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion users/models/follow.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
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)
Expand Down Expand Up @@ -92,6 +92,9 @@ def handle_unrequested(cls, instance: "Follow"):
@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(
Expand Down

0 comments on commit 123c20e

Please sign in to comment.