forked from indymedia/epicyon
Follow debug
parent
baf49224f2
commit
4d34d8a3f6
|
@ -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, \
|
||||
|
|
5
inbox.py
5
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, \
|
||||
|
|
Loading…
Reference in New Issue