mirror of https://gitlab.com/bashrc2/epicyon
Tidying
parent
e8e347199c
commit
f189994879
|
@ -18,7 +18,8 @@ def manualDenyFollowRequest(baseDir: str,nickname: str,domain: str,denyHandle: s
|
|||
handle=args.nickname+'@'+domain
|
||||
accountsDir=baseDir+'/accounts/'+handle
|
||||
approveFollowsFilename=accountsDir+'/followrequests.txt'
|
||||
if handle in open(approveFollowsFilename).read():
|
||||
if handle not in open(approveFollowsFilename).read():
|
||||
return
|
||||
with open(approveFollowsFilename+'.new', 'w') as approvefilenew:
|
||||
with open(approveFollowsFilename, 'r') as approvefile:
|
||||
for approveHandle in approvefile:
|
||||
|
@ -35,13 +36,20 @@ def manualApproveFollowRequest(session,baseDir: str, \
|
|||
sendThreads: [],postLog: [], \
|
||||
cachedWebfingers: {},personCache: {}, \
|
||||
acceptedCaps: [], \
|
||||
debug: bool):
|
||||
debug: bool) -> None:
|
||||
"""Manually approve a follow request
|
||||
"""
|
||||
handle=nickname+'@'+domain
|
||||
accountsDir=baseDir+'/accounts/'+handle
|
||||
approveFollowsFilename=accountsDir+'/followrequests.txt'
|
||||
if handle in open(approveFollowsFilename).read():
|
||||
if not os.path.isfile(approveFollowsFilename):
|
||||
if debug:
|
||||
print('WARN: Follow requests file '+approveFollowsFilename+' not found')
|
||||
return
|
||||
if handle not in open(approveFollowsFilename).read():
|
||||
if debug:
|
||||
print(handle+' not in '+approveFollowsFilename)
|
||||
return
|
||||
with open(approveFollowsFilename+'.new', 'w') as approvefilenew:
|
||||
with open(approveFollowsFilename, 'r') as approvefile:
|
||||
for handle in approvefile:
|
||||
|
|
Loading…
Reference in New Issue