diff options
author | mathieui <mathieui@mathieui.net> | 2022-02-06 17:37:13 +0100 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2022-02-06 17:37:13 +0100 |
commit | 911cf335a12e662e781f1d8adff418c81e43a22d (patch) | |
tree | 769442efd9e68de16b708495725854d44fc0e64c /poezio/tabs/conversationtab.py | |
parent | 8847f3e7de8f36de2079f9622e4673734e9d4a84 (diff) | |
download | poezio-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/conversationtab.py')
-rw-r--r-- | poezio/tabs/conversationtab.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/poezio/tabs/conversationtab.py b/poezio/tabs/conversationtab.py index 9ddb6fc1..b95dff98 100644 --- a/poezio/tabs/conversationtab.py +++ b/poezio/tabs/conversationtab.py @@ -11,6 +11,7 @@ There are two different instances of a ConversationTab: the time. """ +import asyncio import curses import logging from datetime import datetime @@ -209,7 +210,9 @@ class ConversationTab(OneToOneTab): if not msg['body']: return self.set_last_sent_message(msg, correct=correct) - self.core.handler.on_normal_message(msg) + asyncio.ensure_future( + self.core.handler.on_normal_message(msg) + ) # Our receipts slixmpp hack msg._add_receipt = True # type: ignore msg.send() |