summaryrefslogtreecommitdiff
path: root/poezio/tabs/privatetab.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2022-02-06 17:37:13 +0100
committermathieui <mathieui@mathieui.net>2022-02-06 17:37:13 +0100
commit911cf335a12e662e781f1d8adff418c81e43a22d (patch)
tree769442efd9e68de16b708495725854d44fc0e64c /poezio/tabs/privatetab.py
parent8847f3e7de8f36de2079f9622e4673734e9d4a84 (diff)
downloadpoezio-911cf335a12e662e781f1d8adff418c81e43a22d.tar.gz
poezio-911cf335a12e662e781f1d8adff418c81e43a22d.tar.bz2
poezio-911cf335a12e662e781f1d8adff418c81e43a22d.tar.xz
poezio-911cf335a12e662e781f1d8adff418c81e43a22d.zip
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.
Diffstat (limited to 'poezio/tabs/privatetab.py')
-rw-r--r--poezio/tabs/privatetab.py5
1 files changed, 4 insertions, 1 deletions
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()