Follow debug

master
Bob Mottram 2019-08-15 17:05:28 +01:00
parent baf49224f2
commit 4d34d8a3f6
2 changed files with 9 additions and 1 deletions

View File

@ -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, \

View File

@ -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, \