Receiving follow requests from single user instances

main2
Bob Mottram 2019-10-21 13:27:47 +01:00
parent 63af111081
commit a29af6581e
2 changed files with 4 additions and 2 deletions

View File

@ -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.')

View File

@ -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()