forked from indymedia/epicyon
Add a to field on follows if it is missing
parent
55fa512d54
commit
28d5dd15a6
|
@ -363,6 +363,8 @@ def receiveFollowRequest(session,baseDir: str,httpPrefix: str, \
|
|||
if debug:
|
||||
print('DEBUG: follow request does not contain a nickname')
|
||||
return False
|
||||
if not messageJson.get('to'):
|
||||
messageJson['to']=messageJson['object']
|
||||
handle=nickname.lower()+'@'+domain.lower()
|
||||
if '/users/' not in messageJson['object']:
|
||||
if debug:
|
||||
|
|
4
inbox.py
4
inbox.py
|
@ -445,7 +445,9 @@ def receiveUndoFollow(session,baseDir: str,httpPrefix: str, \
|
|||
if debug:
|
||||
print('DEBUG: actors do not match')
|
||||
return False
|
||||
|
||||
if not messageJson['object'].get('to'):
|
||||
messageJson['object']['to']=messageJson['object']['object']
|
||||
|
||||
nicknameFollower=getNicknameFromActor(messageJson['object']['actor'])
|
||||
domainFollower,portFollower=getDomainFromActor(messageJson['object']['actor'])
|
||||
domainFollowerFull=domainFollower
|
||||
|
|
Loading…
Reference in New Issue