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: elif args.gnunet:
proxyType = 'gnunet' proxyType = 'gnunet'
# only store inbox posts if we are not running as a daemon
storeInboxPosts = not args.noKeyPress
runNotificationsClient(baseDir, proxyType, httpPrefix, runNotificationsClient(baseDir, proxyType, httpPrefix,
nickname, domain, port, args.password, nickname, domain, port, args.password,
args.screenreader, args.language, args.screenreader, args.language,
args.notificationSounds, args.notificationSounds,
args.notificationType, args.notificationType,
args.noKeyPress, args.noKeyPress,
storeInboxPosts,
args.debug) args.debug)
sys.exit() sys.exit()

View File

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