diff options
author | mathieui <mathieui@mathieui.net> | 2016-08-26 21:33:19 +0200 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2016-08-26 21:33:19 +0200 |
commit | 7946190019de95353a5adbabc9bb1807c01ff0e9 (patch) | |
tree | ca06b060049c67eb663f0da094fbe56b48364bc5 /plugins/simple_notify.py | |
parent | ad7b72469043ca56f35a7ce04eba35bb1edce38a (diff) | |
download | poezio-7946190019de95353a5adbabc9bb1807c01ff0e9.tar.gz poezio-7946190019de95353a5adbabc9bb1807c01ff0e9.tar.bz2 poezio-7946190019de95353a5adbabc9bb1807c01ff0e9.tar.xz poezio-7946190019de95353a5adbabc9bb1807c01ff0e9.zip |
Fix #3205 (doubled notification in simple_notify)
Diffstat (limited to 'plugins/simple_notify.py')
-rw-r--r-- | plugins/simple_notify.py | 6 |
1 files changed, 5 insertions, 1 deletions
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 |