mirror of https://gitlab.com/bashrc2/epicyon
Keep track of previous values
parent
fc1b22fbd9
commit
13d0bea918
|
@ -160,6 +160,7 @@ def runNotificationsClient(baseDir: str, proxyType: str, httpPrefix: str,
|
||||||
title,
|
title,
|
||||||
'New direct message ' +
|
'New direct message ' +
|
||||||
actor + '/dm')
|
actor + '/dm')
|
||||||
|
prevDM = speakerJson['notify']['dm']
|
||||||
elif replySoundFilename:
|
elif replySoundFilename:
|
||||||
if speakerJson['notify']['reply'] and \
|
if speakerJson['notify']['reply'] and \
|
||||||
speakerJson['notify']['reply'] != prevReply:
|
speakerJson['notify']['reply'] != prevReply:
|
||||||
|
@ -169,6 +170,7 @@ def runNotificationsClient(baseDir: str, proxyType: str, httpPrefix: str,
|
||||||
title,
|
title,
|
||||||
'New reply ' +
|
'New reply ' +
|
||||||
actor + '/tlreplies')
|
actor + '/tlreplies')
|
||||||
|
prevReply = speakerJson['notify']['reply']
|
||||||
elif calendarSoundFilename:
|
elif calendarSoundFilename:
|
||||||
if speakerJson['notify']['calendar'] and \
|
if speakerJson['notify']['calendar'] and \
|
||||||
speakerJson['notify']['calendar'] != prevCalendar:
|
speakerJson['notify']['calendar'] != prevCalendar:
|
||||||
|
@ -178,6 +180,7 @@ def runNotificationsClient(baseDir: str, proxyType: str, httpPrefix: str,
|
||||||
title,
|
title,
|
||||||
'New calendar event ' +
|
'New calendar event ' +
|
||||||
actor + '/calendar')
|
actor + '/calendar')
|
||||||
|
prevCalendar = speakerJson['notify']['calendar']
|
||||||
elif followSoundFilename:
|
elif followSoundFilename:
|
||||||
if speakerJson['notify']['followRequests'] and \
|
if speakerJson['notify']['followRequests'] and \
|
||||||
speakerJson['notify']['followRequests'] != prevFollow:
|
speakerJson['notify']['followRequests'] != prevFollow:
|
||||||
|
@ -187,6 +190,7 @@ def runNotificationsClient(baseDir: str, proxyType: str, httpPrefix: str,
|
||||||
title,
|
title,
|
||||||
'New follow request ' +
|
'New follow request ' +
|
||||||
actor + '/followers#buttonheader')
|
actor + '/followers#buttonheader')
|
||||||
|
prevFollow = speakerJson['notify']['followRequests']
|
||||||
elif likeSoundFilename:
|
elif likeSoundFilename:
|
||||||
if speakerJson['notify']['likedBy'] != prevLike:
|
if speakerJson['notify']['likedBy'] != prevLike:
|
||||||
_playNotificationSound(soundsDir + '/' +
|
_playNotificationSound(soundsDir + '/' +
|
||||||
|
@ -195,6 +199,7 @@ def runNotificationsClient(baseDir: str, proxyType: str, httpPrefix: str,
|
||||||
title,
|
title,
|
||||||
'New like ' +
|
'New like ' +
|
||||||
speakerJson['notify']['likedBy'])
|
speakerJson['notify']['likedBy'])
|
||||||
|
prevLike = speakerJson['notify']['likedBy']
|
||||||
elif shareSoundFilename:
|
elif shareSoundFilename:
|
||||||
if speakerJson['notify']['share'] and \
|
if speakerJson['notify']['share'] and \
|
||||||
speakerJson['notify']['share'] != prevShare:
|
speakerJson['notify']['share'] != prevShare:
|
||||||
|
@ -204,13 +209,7 @@ def runNotificationsClient(baseDir: str, proxyType: str, httpPrefix: str,
|
||||||
title,
|
title,
|
||||||
'New shared item ' +
|
'New shared item ' +
|
||||||
actor + '/shares')
|
actor + '/shares')
|
||||||
|
prevShare = speakerJson['notify']['share']
|
||||||
prevDM = speakerJson['notify']['dm']
|
|
||||||
prevReply = speakerJson['notify']['reply']
|
|
||||||
prevCalendar = speakerJson['notify']['calendar']
|
|
||||||
prevFollow = speakerJson['notify']['followRequests']
|
|
||||||
prevLike = speakerJson['notify']['likedBy']
|
|
||||||
prevShare = speakerJson['notify']['share']
|
|
||||||
|
|
||||||
if speakerJson.get('say'):
|
if speakerJson.get('say'):
|
||||||
if speakerJson['say'] != prevSay:
|
if speakerJson['say'] != prevSay:
|
||||||
|
|
Loading…
Reference in New Issue