Notifier stores inbox posts if not running as a daemon

merge-requests/30/head
Bob Mottram 2021-03-15 10:52:08 +00:00
parent 08775141b0
commit 59b21129f2
2 changed files with 7 additions and 1 deletions

View File

@ -1860,12 +1860,16 @@ if args.notifications:
elif args.gnunet:
proxyType = 'gnunet'
# only store inbox posts if we are not running as a daemon
storeInboxPosts = not args.noKeyPress
runNotificationsClient(baseDir, proxyType, httpPrefix,
nickname, domain, port, args.password,
args.screenreader, args.language,
args.notificationSounds,
args.notificationType,
args.noKeyPress,
storeInboxPosts,
args.debug)
sys.exit()

View File

@ -575,6 +575,7 @@ def runNotificationsClient(baseDir: str, proxyType: str, httpPrefix: str,
notificationSounds: bool,
notificationType: str,
noKeyPress: bool,
storeInboxPosts: bool,
debug: bool) -> None:
"""Runs the notifications and screen reader client,
which announces new inbox items
@ -766,7 +767,8 @@ def runNotificationsClient(baseDir: str, proxyType: str, httpPrefix: str,
_storeMessage(speakerJson, 'dm')
else:
speakerJson['decrypted'] = False
# _storeMessage(speakerJson, 'inbox')
if storeInboxPosts:
_storeMessage(speakerJson, 'inbox')
print('')