Follow accept

master
Bob Mottram 2019-08-31 15:21:59 +01:00
parent a94a332ff1
commit 0dc5d7bf6a
1 changed files with 13 additions and 9 deletions

View File

@ -58,6 +58,7 @@ def manualApproveFollowRequest(session,baseDir: str, \
return
approvefilenew = open(approveFollowsFilename+'.new', 'w+')
updateApprovedFollowers=False
with open(approveFollowsFilename, 'r') as approvefile:
for handle in approvefile:
if handle.startswith(approveHandle):
@ -85,10 +86,13 @@ def manualApproveFollowRequest(session,baseDir: str, \
cachedWebfingers,personCache, \
debug,projectVersion)
os.remove(followActivityfilename)
updateApprovedFollowers=True
else:
approvefilenew.write(handle)
approvefilenew.close()
os.rename(approveFollowsFilename+'.new',approveFollowsFilename)
if updateApprovedFollowers:
# update the followers
followersFilename=accountsDir+'/followers.txt'
if os.path.isfile(followersFilename):