Commit 6c63cdb5 authored by mathieui's avatar mathieui

plugins: fix case of self-message

due to the recent change in conversation_msg
parent 35af9136
Pipeline #3669 passed with stages
in 5 minutes and 2 seconds
...@@ -613,6 +613,8 @@ class Plugin(BasePlugin): ...@@ -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),
......
...@@ -114,7 +114,8 @@ class Plugin(BasePlugin): ...@@ -114,7 +114,8 @@ 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
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): def on_muc_msg(self, message, tab):
# Don't notify if message is from yourself # Don't notify if message is from yourself
......
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