plugins: fix case of self-message

due to the recent change in conversation_msg
This commit is contained in:
mathieui 2021-02-08 22:50:07 +01:00
parent 35af913662
commit 6c63cdb509
2 changed files with 4 additions and 1 deletions

View file

@ -613,6 +613,8 @@ class Plugin(BasePlugin):
""" """
Message received Message received
""" """
if msg['from'].bare == self.core.xmpp.boundjid.bare:
return
format_dict = { format_dict = {
'jid_c': '\x19%s}' % dump_tuple(get_theme().COLOR_MUC_JID), 'jid_c': '\x19%s}' % dump_tuple(get_theme().COLOR_MUC_JID),
'info': '\x19%s}' % dump_tuple(get_theme().COLOR_INFORMATION_TEXT), 'info': '\x19%s}' % dump_tuple(get_theme().COLOR_INFORMATION_TEXT),

View file

@ -114,6 +114,7 @@ class Plugin(BasePlugin):
def on_conversation_msg(self, message, tab): def on_conversation_msg(self, message, tab):
fro = message['from'].bare fro = message['from'].bare
if fro.bare != self.core.xmpp.boundjid.bare:
self.do_notify(message, fro) self.do_notify(message, fro)
def on_muc_msg(self, message, tab): def on_muc_msg(self, message, tab):