forked from indymedia/epicyon
Extra debug on follow accept
parent
aaf5c1a77f
commit
fd8f696f2e
|
@ -86,12 +86,16 @@ def acceptFollow(baseDir: str,domain : str,messageJson: {}, \
|
||||||
return
|
return
|
||||||
if not messageJson['object'].get('type'):
|
if not messageJson['object'].get('type'):
|
||||||
return
|
return
|
||||||
|
if not messageJson['object']['type']=='Follow':
|
||||||
|
return
|
||||||
|
if debug:
|
||||||
|
print('DEBUG: receiving Follow activity')
|
||||||
if not messageJson['object'].get('actor'):
|
if not messageJson['object'].get('actor'):
|
||||||
|
print('DEBUG: no actor in Follow activity')
|
||||||
return
|
return
|
||||||
# no, this isn't a mistake
|
# no, this isn't a mistake
|
||||||
if not messageJson['object'].get('object'):
|
if not messageJson['object'].get('object'):
|
||||||
return
|
print('DEBUG: no object within Follow activity')
|
||||||
if not messageJson['object']['type']=='Follow':
|
|
||||||
return
|
return
|
||||||
if not messageJson.get('to'):
|
if not messageJson.get('to'):
|
||||||
if debug:
|
if debug:
|
||||||
|
@ -132,12 +136,14 @@ def acceptFollow(baseDir: str,domain : str,messageJson: {}, \
|
||||||
followedActor=messageJson['object']['object']
|
followedActor=messageJson['object']['object']
|
||||||
followedDomain,port=getDomainFromActor(followedActor)
|
followedDomain,port=getDomainFromActor(followedActor)
|
||||||
if not followedDomain:
|
if not followedDomain:
|
||||||
|
print('DEBUG: no domain found within Follow activity object '+followedActor)
|
||||||
return
|
return
|
||||||
followedDomainFull=followedDomain
|
followedDomainFull=followedDomain
|
||||||
if port:
|
if port:
|
||||||
followedDomainFull=followedDomain+':'+str(port)
|
followedDomainFull=followedDomain+':'+str(port)
|
||||||
followedNickname=getNicknameFromActor(followedActor)
|
followedNickname=getNicknameFromActor(followedActor)
|
||||||
if not followedNickname:
|
if not followedNickname:
|
||||||
|
print('DEBUG: no nickname found within Follow activity object '+followedActor)
|
||||||
return
|
return
|
||||||
|
|
||||||
acceptedDomainFull=acceptedDomain
|
acceptedDomainFull=acceptedDomain
|
||||||
|
|
Loading…
Reference in New Issue