Follow checks

master
Bob Mottram 2019-07-17 12:28:19 +01:00
parent fb31927502
commit fc42149e66
2 changed files with 4 additions and 6 deletions

View File

@ -410,10 +410,8 @@ def receiveUndoFollow(session,baseDir: str,httpPrefix: str, \
if portFollowing!=80 and portFollowing!=443: if portFollowing!=80 and portFollowing!=443:
domainFollowingFull=domainFollowing+':'+str(portFollowing) domainFollowingFull=domainFollowing+':'+str(portFollowing)
if not unfollowerOfPerson(baseDir,nicknameFollower,domainFollowerFull, \ return unfollowerOfPerson(baseDir,nicknameFollower,domainFollowerFull, \
nicknameFollowing,domainFollowingFull, \ nicknameFollowing,domainFollowingFull)
federationList,debug)
return True
def receiveUndo(session,baseDir: str,httpPrefix: str, \ def receiveUndo(session,baseDir: str,httpPrefix: str, \
port: int,sendThreads: [],postLog: [], \ port: int,sendThreads: [],postLog: [], \

View File

@ -1080,9 +1080,9 @@ def testClientToServer():
True) True)
for t in range(10): for t in range(10):
if os.path.isfile(bobDir+'/accounts/bob@'+bobDomain+'/followers.txt'): if os.path.isfile(bobDir+'/accounts/bob@'+bobDomain+'/followers.txt'):
if 'alice@'+aliceDomain+':'+alicePort in open(bobDir+'/accounts/bob@'+bobDomain+'/followers.txt').read(): if 'alice@'+aliceDomain+':'+str(alicePort) in open(bobDir+'/accounts/bob@'+bobDomain+'/followers.txt').read():
if os.path.isfile(aliceDir+'/accounts/alice@'+aliceDomain+'/following.txt'): if os.path.isfile(aliceDir+'/accounts/alice@'+aliceDomain+'/following.txt'):
if 'bob@'+bobDomain+':'+bobPort in open(aliceDir+'/accounts/alice@'+aliceDomain+'/following.txt').read(): if 'bob@'+bobDomain+':'+str(bobPort) in open(aliceDir+'/accounts/alice@'+aliceDomain+'/following.txt').read():
break break
time.sleep(1) time.sleep(1)