Receiving follow accept/reject from single user instances

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

View File

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

View File

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