summaryrefslogtreecommitdiff
path: root/poezio/tabs/privatetab.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2022-02-10 18:27:05 +0100
committerMaxime “pep” Buquet <pep@bouah.net>2022-02-25 22:35:30 +0100
commit456c4c46a6a740063e25ffcdd6cbdfeb70e4d621 (patch)
tree270d053c32d90f68d433c2ba1559b1ab187df002 /poezio/tabs/privatetab.py
parent101bab502f6076049ea229d887d75d90b4a48356 (diff)
downloadpoezio-456c4c46a6a740063e25ffcdd6cbdfeb70e4d621.tar.gz
poezio-456c4c46a6a740063e25ffcdd6cbdfeb70e4d621.tar.bz2
poezio-456c4c46a6a740063e25ffcdd6cbdfeb70e4d621.tar.xz
poezio-456c4c46a6a740063e25ffcdd6cbdfeb70e4d621.zip
internal: make the other message handlers async
Diffstat (limited to 'poezio/tabs/privatetab.py')
-rw-r--r--poezio/tabs/privatetab.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/poezio/tabs/privatetab.py b/poezio/tabs/privatetab.py
index bb9c6538..25f50a49 100644
--- a/poezio/tabs/privatetab.py
+++ b/poezio/tabs/privatetab.py
@@ -142,7 +142,7 @@ class PrivateTab(OneToOneTab):
and not self.input.get_text().startswith('//'))
self.send_composing_chat_state(empty_after)
- def handle_message(self, message: SMessage, display: bool = True):
+ async def handle_message(self, message: SMessage, display: bool = True):
sent = message['from'].bare == self.core.xmpp.boundjid.bare
jid = message['to'] if sent else message['from']
with_nick = jid.resource
@@ -156,7 +156,7 @@ class PrivateTab(OneToOneTab):
)
tmp_dir = get_image_cache()
if not sent:
- self.core.events.trigger('private_msg', message, self)
+ await self.core.events.trigger_async('private_msg', message, self)
body = xhtml.get_body_from_message_stanza(
message, use_xhtml=use_xhtml, extract_images_to=tmp_dir)
if not body or not self: