From 4d34d8a3f68518dc2497dcfe16393ed2997954a5 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 15 Aug 2019 17:05:28 +0100 Subject: [PATCH] Follow debug --- follow.py | 5 ++++- inbox.py | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/follow.py b/follow.py index 33b331ef..cc4f6985 100644 --- a/follow.py +++ b/follow.py @@ -338,6 +338,7 @@ def receiveFollowRequest(session,baseDir: str,httpPrefix: str, \ """ if not messageJson['type'].startswith('Follow'): return False + print('Receiving follow request') if not messageJson.get('actor'): if debug: print('DEBUG: follow request has no actor') @@ -400,11 +401,13 @@ def receiveFollowRequest(session,baseDir: str,httpPrefix: str, \ # what is the followers policy? if followApprovalRequired(baseDir,nicknameToFollow, \ domainToFollow,debug): + print('Storing follow request for approval') return storeFollowRequest(baseDir, \ nicknameToFollow,domainToFollow,port, \ nickname,domain,fromPort, messageJson,debug) - + + print('Beginning follow accept') return followedAccountAccepts(session,baseDir,httpPrefix, \ nicknameToFollow,domainToFollow,port, \ nickname,domain,fromPort, \ diff --git a/inbox.py b/inbox.py index 7687e490..d6f12551 100644 --- a/inbox.py +++ b/inbox.py @@ -1161,6 +1161,8 @@ def runInboxQueue(projectVersion: str, \ queue.pop(0) continue + if debug: + print('DEBUG: checking for follow requests') if receiveFollowRequest(session, \ baseDir,httpPrefix,port, \ sendThreads,postLog, \ @@ -1175,6 +1177,9 @@ def runInboxQueue(projectVersion: str, \ os.remove(queueFilename) queue.pop(0) continue + else: + if debug: + print('DEBUG: No follow requests') if receiveAcceptReject(session, \ baseDir,httpPrefix,domain,port, \