summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2020-12-17 23:17:45 +0100
committermathieui <mathieui@mathieui.net>2020-12-17 23:22:31 +0100
commit47ce315492dfea7f9654bc3643d4aaf8c203c6a2 (patch)
treec7c28e491b40c196d26333bb738744378a5e315b
parent65b8046fe08a19df937068e5fe5ad15f9b0a785a (diff)
downloadpoezio-47ce315492dfea7f9654bc3643d4aaf8c203c6a2.tar.gz
poezio-47ce315492dfea7f9654bc3643d4aaf8c203c6a2.tar.bz2
poezio-47ce315492dfea7f9654bc3643d4aaf8c203c6a2.tar.xz
poezio-47ce315492dfea7f9654bc3643d4aaf8c203c6a2.zip
plugins: do not fire conversation_msg event on own messages
-rw-r--r--poezio/core/handlers.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/poezio/core/handlers.py b/poezio/core/handlers.py
index 3b839925..a394190c 100644
--- a/poezio/core/handlers.py
+++ b/poezio/core/handlers.py
@@ -380,15 +380,15 @@ class HandlerCore:
tabs.DynamicConversationTab) and conv_jid.resource:
conversation.lock(conv_jid.resource)
- if not own and not conversation.nick:
- conversation.nick = remote_nick
- elif not own:
- remote_nick = conversation.get_nick()
-
if not own:
+ if not conversation.nick:
+ conversation.nick = remote_nick
+ else:
+ remote_nick = conversation.get_nick()
+
conversation.last_remote_message = datetime.now()
+ self.core.events.trigger('conversation_msg', message, conversation)
- self.core.events.trigger('conversation_msg', message, conversation)
if not message['body']:
return
body = xhtml.get_body_from_message_stanza(