From b70316de28fb1c119312cccc01dbb645fcd5583b Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 16 Mar 2021 17:45:41 +0000 Subject: [PATCH 1/2] Wording --- notifications_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notifications_client.py b/notifications_client.py index 07c710605..83c02b181 100644 --- a/notifications_client.py +++ b/notifications_client.py @@ -507,7 +507,7 @@ def _showLocalBox(notifyJson: {}, boxName: str, ' to ' + str(startPostIndex + ctr) + '. ' if newDMs and boxName != 'dm': sayStr += \ - 'Use \33[3mshow dm\33[0m to view DM posts.' + 'Use \33[3mshow dm\33[0m to view direct messages.' elif newReplies and boxName != 'replies': sayStr += \ 'Use \33[3mshow replies\33[0m to view reply posts.' From 00596540af68ad66e3949afbf304324cad4d661c Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 16 Mar 2021 17:53:15 +0000 Subject: [PATCH 2/2] Only revive once --- notifications_client.py | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/notifications_client.py b/notifications_client.py index 83c02b181..0c57db7a6 100644 --- a/notifications_client.py +++ b/notifications_client.py @@ -794,6 +794,7 @@ def runNotificationsClient(baseDir: str, proxyType: str, httpPrefix: str, newRepliesExist = False newDMsExist = False currPostId = '' + firstTime = True while (1): session = createSession(proxyType) notifyJson = None @@ -815,15 +816,17 @@ def runNotificationsClient(baseDir: str, proxyType: str, httpPrefix: str, if not os.path.isdir(soundsDir): soundsDir = 'theme/default/sounds' - # If new DM has not been viewed via web interface - if not speakerJson.get('direct'): - if speakerJson['notify']['dm']: - speakerJson['direct'] = True + if firstTime: + # If new DM has not been viewed via web interface + if not speakerJson.get('direct'): + if speakerJson['notify']['dm']: + speakerJson['direct'] = True - # If new reply has not been viewed via web interface - if not speakerJson.get('replyToYou'): - if speakerJson['notify']['reply']: - speakerJson['replyToYou'] = True + # If new reply has not been viewed via web interface + if not speakerJson.get('replyToYou'): + if speakerJson['notify']['reply']: + speakerJson['replyToYou'] = True + firstTime = False if speakerJson.get('direct'): if speakerJson['direct'] is True: