summaryrefslogtreecommitdiff
path: root/poezio/core/handlers.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2020-12-17 23:19:46 +0100
committermathieui <mathieui@mathieui.net>2020-12-17 23:22:34 +0100
commit9c8bf936713c0f1ebfbe534d800185c3e7329002 (patch)
treed74079f38b97b9a53e0a2319171a6d6252163de9 /poezio/core/handlers.py
parent47ce315492dfea7f9654bc3643d4aaf8c203c6a2 (diff)
downloadpoezio-9c8bf936713c0f1ebfbe534d800185c3e7329002.tar.gz
poezio-9c8bf936713c0f1ebfbe534d800185c3e7329002.tar.bz2
poezio-9c8bf936713c0f1ebfbe534d800185c3e7329002.tar.xz
poezio-9c8bf936713c0f1ebfbe534d800185c3e7329002.zip
plugins: do not fire private_msg event on own messages
Diffstat (limited to 'poezio/core/handlers.py')
-rw-r--r--poezio/core/handlers.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/poezio/core/handlers.py b/poezio/core/handlers.py
index a394190c..80c8330f 100644
--- a/poezio/core/handlers.py
+++ b/poezio/core/handlers.py
@@ -865,7 +865,8 @@ class HandlerCore:
self.core.xmpp.send_message(
mto=jid.full, mbody=msg, mtype='chat')
return
- self.core.events.trigger('private_msg', message, tab)
+ if not sent:
+ self.core.events.trigger('private_msg', message, tab)
body = xhtml.get_body_from_message_stanza(
message, use_xhtml=use_xhtml, extract_images_to=tmp_dir)
if not body or not tab: