From 6c63cdb5099e1d2b1dff53481c6241f6f3fbf6e2 Mon Sep 17 00:00:00 2001 From: mathieui Date: Mon, 8 Feb 2021 22:50:07 +0100 Subject: plugins: fix case of self-message due to the recent change in conversation_msg --- plugins/otr.py | 2 ++ plugins/simple_notify.py | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/otr.py b/plugins/otr.py index 81e1621f..b3848d2d 100644 --- a/plugins/otr.py +++ b/plugins/otr.py @@ -613,6 +613,8 @@ class Plugin(BasePlugin): """ Message received """ + if msg['from'].bare == self.core.xmpp.boundjid.bare: + return format_dict = { 'jid_c': '\x19%s}' % dump_tuple(get_theme().COLOR_MUC_JID), 'info': '\x19%s}' % dump_tuple(get_theme().COLOR_INFORMATION_TEXT), diff --git a/plugins/simple_notify.py b/plugins/simple_notify.py index f4dfd2d2..29418f40 100644 --- a/plugins/simple_notify.py +++ b/plugins/simple_notify.py @@ -114,7 +114,8 @@ class Plugin(BasePlugin): def on_conversation_msg(self, message, tab): fro = message['from'].bare - self.do_notify(message, fro) + if fro.bare != self.core.xmpp.boundjid.bare: + self.do_notify(message, fro) def on_muc_msg(self, message, tab): # Don't notify if message is from yourself -- cgit v1.2.3