mirror of https://gitlab.com/bashrc2/epicyon
Ensure that default settings are preserved during the welcome screen sequence
parent
19908a73c4
commit
786a3f79e3
70
daemon.py
70
daemon.py
|
@ -4717,15 +4717,20 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
nickname, domain)
|
nickname, domain)
|
||||||
|
|
||||||
# approve followers
|
# approve followers
|
||||||
approveFollowers = False
|
if checkNameAndBio:
|
||||||
if fields.get('approveFollowers'):
|
# Default setting created via the welcome screen
|
||||||
if fields['approveFollowers'] == 'on':
|
actorJson['manuallyApprovesFollowers'] = True
|
||||||
approveFollowers = True
|
|
||||||
if approveFollowers != \
|
|
||||||
actorJson['manuallyApprovesFollowers']:
|
|
||||||
actorJson['manuallyApprovesFollowers'] = \
|
|
||||||
approveFollowers
|
|
||||||
actorChanged = True
|
actorChanged = True
|
||||||
|
else:
|
||||||
|
approveFollowers = False
|
||||||
|
if fields.get('approveFollowers'):
|
||||||
|
if fields['approveFollowers'] == 'on':
|
||||||
|
approveFollowers = True
|
||||||
|
if approveFollowers != \
|
||||||
|
actorJson['manuallyApprovesFollowers']:
|
||||||
|
actorJson['manuallyApprovesFollowers'] = \
|
||||||
|
approveFollowers
|
||||||
|
actorChanged = True
|
||||||
|
|
||||||
# remove a custom font
|
# remove a custom font
|
||||||
if fields.get('removeCustomFont'):
|
if fields.get('removeCustomFont'):
|
||||||
|
@ -4773,15 +4778,21 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
baseDir + '/accounts/' + \
|
baseDir + '/accounts/' + \
|
||||||
nickname + '@' + domain + \
|
nickname + '@' + domain + \
|
||||||
'/.followDMs'
|
'/.followDMs'
|
||||||
followDMsActive = False
|
if checkNameAndBio:
|
||||||
if fields.get('followDMs'):
|
# initial default setting created via
|
||||||
if fields['followDMs'] == 'on':
|
# the welcome screen
|
||||||
followDMsActive = True
|
with open(followDMsFilename, 'w+') as fFile:
|
||||||
with open(followDMsFilename, 'w+') as fFile:
|
fFile.write('\n')
|
||||||
fFile.write('\n')
|
else:
|
||||||
if not followDMsActive:
|
followDMsActive = False
|
||||||
if os.path.isfile(followDMsFilename):
|
if fields.get('followDMs'):
|
||||||
os.remove(followDMsFilename)
|
if fields['followDMs'] == 'on':
|
||||||
|
followDMsActive = True
|
||||||
|
with open(followDMsFilename, 'w+') as fFile:
|
||||||
|
fFile.write('\n')
|
||||||
|
if not followDMsActive:
|
||||||
|
if os.path.isfile(followDMsFilename):
|
||||||
|
os.remove(followDMsFilename)
|
||||||
|
|
||||||
# remove Twitter retweets
|
# remove Twitter retweets
|
||||||
removeTwitterFilename = \
|
removeTwitterFilename = \
|
||||||
|
@ -4822,16 +4833,21 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
os.remove(hideLikeButtonFile)
|
os.remove(hideLikeButtonFile)
|
||||||
|
|
||||||
# notify about new Likes
|
# notify about new Likes
|
||||||
notifyLikesActive = False
|
if checkNameAndBio:
|
||||||
if fields.get('notifyLikes'):
|
# default setting from welcome screen
|
||||||
if fields['notifyLikes'] == 'on' and \
|
with open(notifyLikesFilename, 'w+') as rFile:
|
||||||
not hideLikeButtonActive:
|
rFile.write('\n')
|
||||||
notifyLikesActive = True
|
else:
|
||||||
with open(notifyLikesFilename, 'w+') as rFile:
|
notifyLikesActive = False
|
||||||
rFile.write('\n')
|
if fields.get('notifyLikes'):
|
||||||
if not notifyLikesActive:
|
if fields['notifyLikes'] == 'on' and \
|
||||||
if os.path.isfile(notifyLikesFilename):
|
not hideLikeButtonActive:
|
||||||
os.remove(notifyLikesFilename)
|
notifyLikesActive = True
|
||||||
|
with open(notifyLikesFilename, 'w+') as rFile:
|
||||||
|
rFile.write('\n')
|
||||||
|
if not notifyLikesActive:
|
||||||
|
if os.path.isfile(notifyLikesFilename):
|
||||||
|
os.remove(notifyLikesFilename)
|
||||||
|
|
||||||
# this account is a bot
|
# this account is a bot
|
||||||
if fields.get('isBot'):
|
if fields.get('isBot'):
|
||||||
|
|
Loading…
Reference in New Issue