diff options
author | mathieui <mathieui@mathieui.net> | 2021-01-30 12:17:34 +0100 |
---|---|---|
committer | Link Mauve <linkmauve@linkmauve.fr> | 2021-02-03 15:22:09 +0100 |
commit | 341c770b362e5d5fe070429969de136e7b23c10a (patch) | |
tree | 4a7587ff940829ebb72a5d78136dc8adc6624326 /poezio/core/commands.py | |
parent | 048f3d5fd3189a9ae5a595380dee7171d0e95d13 (diff) | |
download | poezio-341c770b362e5d5fe070429969de136e7b23c10a.tar.gz poezio-341c770b362e5d5fe070429969de136e7b23c10a.tar.bz2 poezio-341c770b362e5d5fe070429969de136e7b23c10a.tar.xz poezio-341c770b362e5d5fe070429969de136e7b23c10a.zip |
invite: remove callback and force impromptu rooms to use mediated
Diffstat (limited to 'poezio/core/commands.py')
-rw-r--r-- | poezio/core/commands.py | 7 |
1 files changed, 4 insertions, 3 deletions
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 <to> <room> [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: |