When remote follows local, hold off sending Accept if remote identity is not fully fetched (#676)
This commit is contained in:
parent
83607779cd
commit
123c20efb1
|
@ -17,7 +17,7 @@ logger = logging.getLogger(__name__)
|
||||||
class FollowStates(StateGraph):
|
class FollowStates(StateGraph):
|
||||||
unrequested = State(try_interval=600)
|
unrequested = State(try_interval=600)
|
||||||
pending_approval = State(externally_progressed=True)
|
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)
|
rejecting = State(try_interval=24 * 60 * 60)
|
||||||
accepted = State(externally_progressed=True)
|
accepted = State(externally_progressed=True)
|
||||||
undone = State(try_interval=24 * 60 * 60)
|
undone = State(try_interval=24 * 60 * 60)
|
||||||
|
@ -92,6 +92,9 @@ class FollowStates(StateGraph):
|
||||||
@classmethod
|
@classmethod
|
||||||
def handle_accepting(cls, instance: "Follow"):
|
def handle_accepting(cls, instance: "Follow"):
|
||||||
if not instance.source.local:
|
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
|
# send an Accept object to the source server
|
||||||
try:
|
try:
|
||||||
instance.target.signed_request(
|
instance.target.signed_request(
|
||||||
|
|
Loading…
Reference in New Issue