From 6174ca70d9bc36fde9d0a0c08ccb67e874a4711c Mon Sep 17 00:00:00 2001 From: mathieui Date: Tue, 15 Feb 2022 22:43:10 +0100 Subject: internal: make command_say async --- poezio/tabs/privatetab.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'poezio/tabs/privatetab.py') 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() -- cgit v1.2.3