From a29af6581ef288295a177482ae0d03e8a6f8dc5e Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 21 Oct 2019 13:27:47 +0100 Subject: [PATCH] Receiving follow requests from single user instances --- acceptreject.py | 1 + follow.py | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/acceptreject.py b/acceptreject.py index f1eecdea..76f18713 100644 --- a/acceptreject.py +++ b/acceptreject.py @@ -197,6 +197,7 @@ def receiveAcceptReject(session,baseDir: str, \ return False nickname=getNicknameFromActor(messageJson['actor']) if not nickname: + # single user instance nickname='dev' if debug: print('DEBUG: '+messageJson['type']+' does not contain a nickname. Assuming single user instance.') diff --git a/follow.py b/follow.py index 31a3c115..865c040c 100644 --- a/follow.py +++ b/follow.py @@ -459,9 +459,10 @@ def receiveFollowRequest(session,baseDir: str,httpPrefix: str, \ return False nickname=getNicknameFromActor(messageJson['actor']) if not nickname: + # single user instance + nickname='dev' if debug: - print('DEBUG: follow request does not contain a nickname') - return False + print('DEBUG: follow request does not contain a nickname. Assuming single user instance.') if not messageJson.get('to'): messageJson['to']=messageJson['object'] handle=nickname.lower()+'@'+domain.lower()