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'):
|
if not messageJson['type'].startswith('Follow'):
|
||||||
return False
|
return False
|
||||||
|
print('Receiving follow request')
|
||||||
if not messageJson.get('actor'):
|
if not messageJson.get('actor'):
|
||||||
if debug:
|
if debug:
|
||||||
print('DEBUG: follow request has no actor')
|
print('DEBUG: follow request has no actor')
|
||||||
|
@ -400,11 +401,13 @@ def receiveFollowRequest(session,baseDir: str,httpPrefix: str, \
|
||||||
# what is the followers policy?
|
# what is the followers policy?
|
||||||
if followApprovalRequired(baseDir,nicknameToFollow, \
|
if followApprovalRequired(baseDir,nicknameToFollow, \
|
||||||
domainToFollow,debug):
|
domainToFollow,debug):
|
||||||
|
print('Storing follow request for approval')
|
||||||
return storeFollowRequest(baseDir, \
|
return storeFollowRequest(baseDir, \
|
||||||
nicknameToFollow,domainToFollow,port, \
|
nicknameToFollow,domainToFollow,port, \
|
||||||
nickname,domain,fromPort,
|
nickname,domain,fromPort,
|
||||||
messageJson,debug)
|
messageJson,debug)
|
||||||
|
|
||||||
|
print('Beginning follow accept')
|
||||||
return followedAccountAccepts(session,baseDir,httpPrefix, \
|
return followedAccountAccepts(session,baseDir,httpPrefix, \
|
||||||
nicknameToFollow,domainToFollow,port, \
|
nicknameToFollow,domainToFollow,port, \
|
||||||
nickname,domain,fromPort, \
|
nickname,domain,fromPort, \
|
||||||
|
|
5
inbox.py
5
inbox.py
|
@ -1161,6 +1161,8 @@ def runInboxQueue(projectVersion: str, \
|
||||||
queue.pop(0)
|
queue.pop(0)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
if debug:
|
||||||
|
print('DEBUG: checking for follow requests')
|
||||||
if receiveFollowRequest(session, \
|
if receiveFollowRequest(session, \
|
||||||
baseDir,httpPrefix,port, \
|
baseDir,httpPrefix,port, \
|
||||||
sendThreads,postLog, \
|
sendThreads,postLog, \
|
||||||
|
@ -1175,6 +1177,9 @@ def runInboxQueue(projectVersion: str, \
|
||||||
os.remove(queueFilename)
|
os.remove(queueFilename)
|
||||||
queue.pop(0)
|
queue.pop(0)
|
||||||
continue
|
continue
|
||||||
|
else:
|
||||||
|
if debug:
|
||||||
|
print('DEBUG: No follow requests')
|
||||||
|
|
||||||
if receiveAcceptReject(session, \
|
if receiveAcceptReject(session, \
|
||||||
baseDir,httpPrefix,domain,port, \
|
baseDir,httpPrefix,domain,port, \
|
||||||
|
|
Loading…
Reference in New Issue