summaryrefslogtreecommitdiff
path: root/poezio/tabs/privatetab.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2022-02-15 22:43:10 +0100
committerMaxime Buquet <pep@bouah.net>2022-03-23 15:38:00 +0100
commit6174ca70d9bc36fde9d0a0c08ccb67e874a4711c (patch)
tree45cd819c9599a75c9af2dd0739dd7d03b8ba2060 /poezio/tabs/privatetab.py
parentd6de6dccfa4b832a84edd394bee4f92a00069277 (diff)
downloadpoezio-6174ca70d9bc36fde9d0a0c08ccb67e874a4711c.tar.gz
poezio-6174ca70d9bc36fde9d0a0c08ccb67e874a4711c.tar.bz2
poezio-6174ca70d9bc36fde9d0a0c08ccb67e874a4711c.tar.xz
poezio-6174ca70d9bc36fde9d0a0c08ccb67e874a4711c.zip
internal: make command_say async
Diffstat (limited to 'poezio/tabs/privatetab.py')
-rw-r--r--poezio/tabs/privatetab.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/poezio/tabs/privatetab.py b/poezio/tabs/privatetab.py
index fc126b66..9ed968b7 100644
--- a/poezio/tabs/privatetab.py
+++ b/poezio/tabs/privatetab.py
@@ -202,7 +202,7 @@ class PrivateTab(OneToOneTab):
@refresh_wrapper.always
@command_args_parser.raw
- def command_say(self, line: str, attention: bool = False, correct: bool = False) -> None:
+ async def command_say(self, line: str, attention: bool = False, correct: bool = False) -> None:
if not self.on:
return
our_jid = JID(self.jid.bare)
@@ -240,9 +240,7 @@ class PrivateTab(OneToOneTab):
if not msg['body']:
return
self.set_last_sent_message(msg, correct=correct)
- asyncio.ensure_future(
- self.core.handler.on_groupchat_private_message(msg, sent=True)
- )
+ await self.core.handler.on_groupchat_private_message(msg, sent=True)
# Our receipts slixmpp hack
msg._add_receipt = True # type: ignore
msg.send()