mirror of https://gitlab.com/bashrc2/epicyon
Preserve default after welcome screen
parent
786a3f79e3
commit
43e3a70d1e
10
daemon.py
10
daemon.py
|
@ -4050,6 +4050,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
postBytesStr = postBytes.decode('utf-8')
|
postBytesStr = postBytes.decode('utf-8')
|
||||||
redirectPath = ''
|
redirectPath = ''
|
||||||
checkNameAndBio = False
|
checkNameAndBio = False
|
||||||
|
onFinalWelcomeScreen = False
|
||||||
if 'name="previewAvatar"' in postBytesStr:
|
if 'name="previewAvatar"' in postBytesStr:
|
||||||
redirectPath = '/welcome_profile'
|
redirectPath = '/welcome_profile'
|
||||||
elif 'name="initialWelcomeScreen"' in postBytesStr:
|
elif 'name="initialWelcomeScreen"' in postBytesStr:
|
||||||
|
@ -4061,6 +4062,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
redirectPath = '/' + self.server.defaultTimeline
|
redirectPath = '/' + self.server.defaultTimeline
|
||||||
welcomeScreenIsComplete(self.server.baseDir, nickname,
|
welcomeScreenIsComplete(self.server.baseDir, nickname,
|
||||||
self.server.domain)
|
self.server.domain)
|
||||||
|
onFinalWelcomeScreen = True
|
||||||
|
|
||||||
# extract all of the text fields into a dict
|
# extract all of the text fields into a dict
|
||||||
fields = \
|
fields = \
|
||||||
|
@ -4717,7 +4719,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
nickname, domain)
|
nickname, domain)
|
||||||
|
|
||||||
# approve followers
|
# approve followers
|
||||||
if checkNameAndBio:
|
if onFinalWelcomeScreen:
|
||||||
# Default setting created via the welcome screen
|
# Default setting created via the welcome screen
|
||||||
actorJson['manuallyApprovesFollowers'] = True
|
actorJson['manuallyApprovesFollowers'] = True
|
||||||
actorChanged = True
|
actorChanged = True
|
||||||
|
@ -4778,11 +4780,12 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
baseDir + '/accounts/' + \
|
baseDir + '/accounts/' + \
|
||||||
nickname + '@' + domain + \
|
nickname + '@' + domain + \
|
||||||
'/.followDMs'
|
'/.followDMs'
|
||||||
if checkNameAndBio:
|
if onFinalWelcomeScreen:
|
||||||
# initial default setting created via
|
# initial default setting created via
|
||||||
# the welcome screen
|
# the welcome screen
|
||||||
with open(followDMsFilename, 'w+') as fFile:
|
with open(followDMsFilename, 'w+') as fFile:
|
||||||
fFile.write('\n')
|
fFile.write('\n')
|
||||||
|
actorChanged = True
|
||||||
else:
|
else:
|
||||||
followDMsActive = False
|
followDMsActive = False
|
||||||
if fields.get('followDMs'):
|
if fields.get('followDMs'):
|
||||||
|
@ -4833,10 +4836,11 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
os.remove(hideLikeButtonFile)
|
os.remove(hideLikeButtonFile)
|
||||||
|
|
||||||
# notify about new Likes
|
# notify about new Likes
|
||||||
if checkNameAndBio:
|
if onFinalWelcomeScreen:
|
||||||
# default setting from welcome screen
|
# default setting from welcome screen
|
||||||
with open(notifyLikesFilename, 'w+') as rFile:
|
with open(notifyLikesFilename, 'w+') as rFile:
|
||||||
rFile.write('\n')
|
rFile.write('\n')
|
||||||
|
actorChanged = True
|
||||||
else:
|
else:
|
||||||
notifyLikesActive = False
|
notifyLikesActive = False
|
||||||
if fields.get('notifyLikes'):
|
if fields.get('notifyLikes'):
|
||||||
|
|
Loading…
Reference in New Issue