plugins: do not fire private_msg event on own messages

This commit is contained in:
mathieui 2020-12-17 23:19:46 +01:00
parent 47ce315492
commit 9c8bf93671
No known key found for this signature in database
GPG key ID: C59F84CEEFD616E3

View file

@ -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: