mirror of https://gitlab.com/bashrc2/epicyon
Check for changed post id
parent
29e3fcf8d0
commit
9b79523262
|
@ -788,6 +788,7 @@ def runNotificationsClient(baseDir: str, proxyType: str, httpPrefix: str,
|
|||
currRepliesIndex = 0
|
||||
currSentIndex = 0
|
||||
newRepliesExist = False
|
||||
currPostId = ''
|
||||
while (1):
|
||||
session = createSession(proxyType)
|
||||
notifyJson = None
|
||||
|
@ -795,7 +796,7 @@ def runNotificationsClient(baseDir: str, proxyType: str, httpPrefix: str,
|
|||
getSpeakerFromServer(baseDir, session, nickname, password,
|
||||
domain, port, httpPrefix, True, __version__)
|
||||
if speakerJson:
|
||||
if speakerJson.get('notify'):
|
||||
if speakerJson.get('notify') and speakerJson.get('id'):
|
||||
notifyJson = speakerJson['notify']
|
||||
title = 'Epicyon'
|
||||
if speakerJson['notify'].get('title'):
|
||||
|
@ -810,6 +811,7 @@ def runNotificationsClient(baseDir: str, proxyType: str, httpPrefix: str,
|
|||
soundsDir = 'theme/default/sounds'
|
||||
if speakerJson['notify'].get('direct'):
|
||||
if speakerJson['notify']['direct'] is True:
|
||||
if currPostId != speakerJson['id']:
|
||||
if notificationSounds:
|
||||
_playNotificationSound(soundsDir + '/' +
|
||||
dmSoundFilename, player)
|
||||
|
@ -818,6 +820,7 @@ def runNotificationsClient(baseDir: str, proxyType: str, httpPrefix: str,
|
|||
actor + '/dm')
|
||||
elif speakerJson['notify'].get('replyToYou'):
|
||||
if speakerJson['notify']['replyToYou'] is True:
|
||||
if currPostId != speakerJson['id']:
|
||||
if notificationSounds:
|
||||
_playNotificationSound(soundsDir + '/' +
|
||||
replySoundFilename,
|
||||
|
@ -926,6 +929,8 @@ def runNotificationsClient(baseDir: str, proxyType: str, httpPrefix: str,
|
|||
print('')
|
||||
|
||||
prevSay = speakerJson['say']
|
||||
if speakerJson.get('id'):
|
||||
currPostId = speakerJson['id']
|
||||
|
||||
# wait for a while, or until a key is pressed
|
||||
if noKeyPress:
|
||||
|
|
Loading…
Reference in New Issue