diff options
Diffstat (limited to 'poezio/core')
-rw-r--r-- | poezio/core/commands.py | 4 | ||||
-rw-r--r-- | poezio/core/core.py | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/poezio/core/commands.py b/poezio/core/commands.py index 9ad5a78c..f4662021 100644 --- a/poezio/core/commands.py +++ b/poezio/core/commands.py @@ -1283,7 +1283,7 @@ class CommandCore: list(self.core.plugin_manager.plugins.keys())), 'Info') @command_args_parser.quoted(1, 1) - def message(self, args): + async def message(self, args): """ /message <jid> [message] """ @@ -1313,7 +1313,7 @@ class CommandCore: else: self.core.focus_tab(tab) if len(args) == 2: - tab.command_say(args[1]) + await tab.command_say(args[1]) @command_args_parser.ignored def xml_tab(self): diff --git a/poezio/core/core.py b/poezio/core/core.py index bc57024c..0c71b566 100644 --- a/poezio/core/core.py +++ b/poezio/core/core.py @@ -906,7 +906,9 @@ class Core: """ if not isinstance(self.tabs.current_tab, ChatTab): return False - self.tabs.current_tab.command_say(msg) + asyncio.ensure_future( + self.tabs.current_tab.command_say(msg) + ) return True async def invite(self, jid: JID, room: JID, reason: Optional[str] = None, force_mediated: bool = False) -> bool: |