From 7946190019de95353a5adbabc9bb1807c01ff0e9 Mon Sep 17 00:00:00 2001 From: mathieui Date: Fri, 26 Aug 2016 21:33:19 +0200 Subject: [PATCH] Fix #3205 (doubled notification in simple_notify) --- plugins/simple_notify.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/simple_notify.py b/plugins/simple_notify.py index 9f35c437..60482101 100644 --- a/plugins/simple_notify.py +++ b/plugins/simple_notify.py @@ -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