From 341c770b362e5d5fe070429969de136e7b23c10a Mon Sep 17 00:00:00 2001 From: mathieui Date: Sat, 30 Jan 2021 12:17:34 +0100 Subject: invite: remove callback and force impromptu rooms to use mediated --- poezio/core/commands.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'poezio/core/commands.py') diff --git a/poezio/core/commands.py b/poezio/core/commands.py index 5dbf5b8b..b68a922e 100644 --- a/poezio/core/commands.py +++ b/poezio/core/commands.py @@ -996,7 +996,7 @@ class CommandCore: name=name, server_address=address, callback=dumb_callback) @command_args_parser.quoted(2, 1, [None]) - def invite(self, args): + async def invite(self, args): """/invite [reason]""" if args is None: @@ -1013,8 +1013,9 @@ class CommandCore: except InvalidJID: self.core.information('Invalid room JID specified to invite: %s' % args[1], 'Error') return None - self.core.invite(to.full, room, reason=reason) - self.core.information('Invited %s to %s' % (to.bare, room), 'Info') + result = await self.core.invite(to.full, room, reason=reason) + if result: + self.core.information('Invited %s to %s' % (to.bare, room), 'Info') @command_args_parser.quoted(1, 0) def impromptu(self, args: str) -> None: -- cgit v1.2.3