From 63af1110818bae264521454fdeaa32171b6b964b Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 21 Oct 2019 13:06:13 +0100 Subject: [PATCH] Receiving follow accept/reject from single user instances --- acceptreject.py | 7 +++---- webinterface.py | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/acceptreject.py b/acceptreject.py index 4dc566f5..f1eecdea 100644 --- a/acceptreject.py +++ b/acceptreject.py @@ -189,8 +189,7 @@ def receiveAcceptReject(session,baseDir: str, \ '/channel/' not in messageJson['actor'] and \ '/profile/' not in messageJson['actor']: if debug: - print('DEBUG: "users" or "profile" missing from actor in '+messageJson['type']) - return False + print('DEBUG: "users" or "profile" missing from actor in '+messageJson['type']+'. Assuming single user instance.') domain,tempPort=getDomainFromActor(messageJson['actor']) if not domainPermitted(domain,federationList): if debug: @@ -198,9 +197,9 @@ def receiveAcceptReject(session,baseDir: str, \ return False nickname=getNicknameFromActor(messageJson['actor']) if not nickname: + nickname='dev' if debug: - print('DEBUG: '+messageJson['type']+' does not contain a nickname') - return False + print('DEBUG: '+messageJson['type']+' does not contain a nickname. Assuming single user instance.') handle=nickname.lower()+'@'+domain.lower() # receive follow accept acceptFollow(baseDir,domain,messageJson,federationList,debug) diff --git a/webinterface.py b/webinterface.py index ef30f176..6360ae33 100644 --- a/webinterface.py +++ b/webinterface.py @@ -1819,7 +1819,7 @@ def individualPostAsHtml(iconsDir: str,translate: {}, \ actorNickname=getNicknameFromActor(postJsonObject['actor']) if not actorNickname: # single user instance - actorNickname='owner' + actorNickname='dev' actorDomain,actorPort=getDomainFromActor(postJsonObject['actor']) messageId='' if postJsonObject.get('id'):