Commit 79461900 authored by mathieui's avatar mathieui

Fix #3205 (doubled notification in simple_notify)

parent ad7b7246
...@@ -104,6 +104,10 @@ class Plugin(BasePlugin): ...@@ -104,6 +104,10 @@ class Plugin(BasePlugin):
self.do_notify(message, fro) self.do_notify(message, fro)
def on_highlight(self, message, tab): 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 fro = message['from'].resource
self.do_notify(message, fro) self.do_notify(message, fro)
...@@ -118,7 +122,7 @@ class Plugin(BasePlugin): ...@@ -118,7 +122,7 @@ class Plugin(BasePlugin):
fro = message['from'].full fro = message['from'].full
muc = message['from'].bare muc = message['from'].bare
whitelist=self.config.get('muc_list', '').split(':') whitelist = self.config.get('muc_list', '').split(':')
# Prevent old messages to be notified # Prevent old messages to be notified
# find_delayed_tag(message) returns (True, the datetime) or # find_delayed_tag(message) returns (True, the datetime) or
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment