Ensure that default settings are preserved during the welcome screen sequence

merge-requests/30/head
Bob Mottram 2021-02-26 14:01:42 +00:00
parent 19908a73c4
commit 786a3f79e3
1 changed files with 43 additions and 27 deletions

View File

@ -4717,6 +4717,11 @@ class PubServer(BaseHTTPRequestHandler):
nickname, domain)
# approve followers
if checkNameAndBio:
# Default setting created via the welcome screen
actorJson['manuallyApprovesFollowers'] = True
actorChanged = True
else:
approveFollowers = False
if fields.get('approveFollowers'):
if fields['approveFollowers'] == 'on':
@ -4773,6 +4778,12 @@ class PubServer(BaseHTTPRequestHandler):
baseDir + '/accounts/' + \
nickname + '@' + domain + \
'/.followDMs'
if checkNameAndBio:
# initial default setting created via
# the welcome screen
with open(followDMsFilename, 'w+') as fFile:
fFile.write('\n')
else:
followDMsActive = False
if fields.get('followDMs'):
if fields['followDMs'] == 'on':
@ -4822,6 +4833,11 @@ class PubServer(BaseHTTPRequestHandler):
os.remove(hideLikeButtonFile)
# notify about new Likes
if checkNameAndBio:
# default setting from welcome screen
with open(notifyLikesFilename, 'w+') as rFile:
rFile.write('\n')
else:
notifyLikesActive = False
if fields.get('notifyLikes'):
if fields['notifyLikes'] == 'on' and \