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:
|
if debug:
|
||||||
print('DEBUG: follow request does not contain a nickname')
|
print('DEBUG: follow request does not contain a nickname')
|
||||||
return False
|
return False
|
||||||
|
if not messageJson.get('to'):
|
||||||
|
messageJson['to']=messageJson['object']
|
||||||
handle=nickname.lower()+'@'+domain.lower()
|
handle=nickname.lower()+'@'+domain.lower()
|
||||||
if '/users/' not in messageJson['object']:
|
if '/users/' not in messageJson['object']:
|
||||||
if debug:
|
if debug:
|
||||||
|
|
2
inbox.py
2
inbox.py
|
@ -445,6 +445,8 @@ def receiveUndoFollow(session,baseDir: str,httpPrefix: str, \
|
||||||
if debug:
|
if debug:
|
||||||
print('DEBUG: actors do not match')
|
print('DEBUG: actors do not match')
|
||||||
return False
|
return False
|
||||||
|
if not messageJson['object'].get('to'):
|
||||||
|
messageJson['object']['to']=messageJson['object']['object']
|
||||||
|
|
||||||
nicknameFollower=getNicknameFromActor(messageJson['object']['actor'])
|
nicknameFollower=getNicknameFromActor(messageJson['object']['actor'])
|
||||||
domainFollower,portFollower=getDomainFromActor(messageJson['object']['actor'])
|
domainFollower,portFollower=getDomainFromActor(messageJson['object']['actor'])
|
||||||
|
|
Loading…
Reference in New Issue