mirror of https://gitlab.com/bashrc2/epicyon
Receiving follow requests from single user instances
parent
63af111081
commit
a29af6581e
|
@ -197,6 +197,7 @@ def receiveAcceptReject(session,baseDir: str, \
|
||||||
return False
|
return False
|
||||||
nickname=getNicknameFromActor(messageJson['actor'])
|
nickname=getNicknameFromActor(messageJson['actor'])
|
||||||
if not nickname:
|
if not nickname:
|
||||||
|
# single user instance
|
||||||
nickname='dev'
|
nickname='dev'
|
||||||
if debug:
|
if debug:
|
||||||
print('DEBUG: '+messageJson['type']+' does not contain a nickname. Assuming single user instance.')
|
print('DEBUG: '+messageJson['type']+' does not contain a nickname. Assuming single user instance.')
|
||||||
|
|
|
@ -459,9 +459,10 @@ def receiveFollowRequest(session,baseDir: str,httpPrefix: str, \
|
||||||
return False
|
return False
|
||||||
nickname=getNicknameFromActor(messageJson['actor'])
|
nickname=getNicknameFromActor(messageJson['actor'])
|
||||||
if not nickname:
|
if not nickname:
|
||||||
|
# single user instance
|
||||||
|
nickname='dev'
|
||||||
if debug:
|
if debug:
|
||||||
print('DEBUG: follow request does not contain a nickname')
|
print('DEBUG: follow request does not contain a nickname. Assuming single user instance.')
|
||||||
return False
|
|
||||||
if not messageJson.get('to'):
|
if not messageJson.get('to'):
|
||||||
messageJson['to']=messageJson['object']
|
messageJson['to']=messageJson['object']
|
||||||
handle=nickname.lower()+'@'+domain.lower()
|
handle=nickname.lower()+'@'+domain.lower()
|
||||||
|
|
Loading…
Reference in New Issue