forked from indymedia/epicyon
Follow accept
parent
a94a332ff1
commit
0dc5d7bf6a
|
@ -58,6 +58,7 @@ def manualApproveFollowRequest(session,baseDir: str, \
|
||||||
return
|
return
|
||||||
|
|
||||||
approvefilenew = open(approveFollowsFilename+'.new', 'w+')
|
approvefilenew = open(approveFollowsFilename+'.new', 'w+')
|
||||||
|
updateApprovedFollowers=False
|
||||||
with open(approveFollowsFilename, 'r') as approvefile:
|
with open(approveFollowsFilename, 'r') as approvefile:
|
||||||
for handle in approvefile:
|
for handle in approvefile:
|
||||||
if handle.startswith(approveHandle):
|
if handle.startswith(approveHandle):
|
||||||
|
@ -85,10 +86,13 @@ def manualApproveFollowRequest(session,baseDir: str, \
|
||||||
cachedWebfingers,personCache, \
|
cachedWebfingers,personCache, \
|
||||||
debug,projectVersion)
|
debug,projectVersion)
|
||||||
os.remove(followActivityfilename)
|
os.remove(followActivityfilename)
|
||||||
|
updateApprovedFollowers=True
|
||||||
else:
|
else:
|
||||||
approvefilenew.write(handle)
|
approvefilenew.write(handle)
|
||||||
approvefilenew.close()
|
approvefilenew.close()
|
||||||
os.rename(approveFollowsFilename+'.new',approveFollowsFilename)
|
os.rename(approveFollowsFilename+'.new',approveFollowsFilename)
|
||||||
|
|
||||||
|
if updateApprovedFollowers:
|
||||||
# update the followers
|
# update the followers
|
||||||
followersFilename=accountsDir+'/followers.txt'
|
followersFilename=accountsDir+'/followers.txt'
|
||||||
if os.path.isfile(followersFilename):
|
if os.path.isfile(followersFilename):
|
||||||
|
|
Loading…
Reference in New Issue