Fix #3205 (doubled notification in simple_notify)

This commit is contained in:
mathieui 2016-08-26 21:33:19 +02:00
parent ad7b724690
commit 7946190019

View file

@ -104,6 +104,10 @@ class Plugin(BasePlugin):
self.do_notify(message, fro)
def on_highlight(self, message, tab):
whitelist = self.config.get('muc_list', '').split(':')
# prevents double notifications
if message['from'].bare in whitelist:
return
fro = message['from'].resource
self.do_notify(message, fro)
@ -118,7 +122,7 @@ class Plugin(BasePlugin):
fro = message['from'].full
muc = message['from'].bare
whitelist=self.config.get('muc_list', '').split(':')
whitelist = self.config.get('muc_list', '').split(':')
# Prevent old messages to be notified
# find_delayed_tag(message) returns (True, the datetime) or