From 911cf335a12e662e781f1d8adff418c81e43a22d Mon Sep 17 00:00:00 2001 From: mathieui Date: Sun, 6 Feb 2022 17:37:13 +0100 Subject: internal: make most core.handlers async add some typing annotations on inputs as well, most are not necessary right now but the end goal is to make poezio internals much more async-friendly than it currently is. --- poezio/tabs/privatetab.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'poezio/tabs/privatetab.py') diff --git a/poezio/tabs/privatetab.py b/poezio/tabs/privatetab.py index fb89d8e6..bb9c6538 100644 --- a/poezio/tabs/privatetab.py +++ b/poezio/tabs/privatetab.py @@ -10,6 +10,7 @@ both participant’s nicks. It also has slightly different features than the ConversationTab (such as tab-completion on nicks from the room). """ +import asyncio import curses import logging from datetime import datetime @@ -239,7 +240,9 @@ class PrivateTab(OneToOneTab): if not msg['body']: return self.set_last_sent_message(msg, correct=correct) - self.core.handler.on_groupchat_private_message(msg, sent=True) + asyncio.ensure_future( + self.core.handler.on_groupchat_private_message(msg, sent=True) + ) # Our receipts slixmpp hack msg._add_receipt = True # type: ignore msg.send() -- cgit v1.2.3