From fd8f696f2eab7ec3070ef20c5838edd4e588fff6 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 12 Nov 2019 14:18:23 +0000 Subject: [PATCH] Extra debug on follow accept --- acceptreject.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/acceptreject.py b/acceptreject.py index 94a606b0..7bac52a0 100644 --- a/acceptreject.py +++ b/acceptreject.py @@ -86,13 +86,17 @@ def acceptFollow(baseDir: str,domain : str,messageJson: {}, \ return if not messageJson['object'].get('type'): return + if not messageJson['object']['type']=='Follow': + return + if debug: + print('DEBUG: receiving Follow activity') if not messageJson['object'].get('actor'): + print('DEBUG: no actor in Follow activity') return # no, this isn't a mistake if not messageJson['object'].get('object'): + print('DEBUG: no object within Follow activity') return - if not messageJson['object']['type']=='Follow': - return if not messageJson.get('to'): if debug: print('DEBUG: No "to" parameter in follow Accept') @@ -132,12 +136,14 @@ def acceptFollow(baseDir: str,domain : str,messageJson: {}, \ followedActor=messageJson['object']['object'] followedDomain,port=getDomainFromActor(followedActor) if not followedDomain: + print('DEBUG: no domain found within Follow activity object '+followedActor) return followedDomainFull=followedDomain if port: followedDomainFull=followedDomain+':'+str(port) followedNickname=getNicknameFromActor(followedActor) if not followedNickname: + print('DEBUG: no nickname found within Follow activity object '+followedActor) return acceptedDomainFull=acceptedDomain