Don't allow DMs from randos by default

main
Bob Mottram 2020-07-12 14:28:03 +01:00
parent 9bc6f1691e
commit 26086ab1d0
1 changed files with 6 additions and 0 deletions

View File

@ -439,6 +439,12 @@ def createPerson(baseDir: str, nickname: str, domain: str, port: int,
setRole(baseDir, nickname, domain, 'instance', 'delegator')
setConfigParam(baseDir, 'admin', nickname)
if manualFollowerApproval:
followDMsFilename = baseDir + '/accounts/' + \
nickname + '@' + domain + '/.followDMs'
with open(followDMsFilename, "w") as fFile:
fFile.write('\n')
if not os.path.isdir(baseDir + '/accounts'):
os.mkdir(baseDir + '/accounts')
if not os.path.isdir(baseDir + '/accounts/' + nickname + '@' + domain):