diff options
author | mathieui <mathieui@mathieui.net> | 2021-01-30 12:47:53 +0100 |
---|---|---|
committer | Link Mauve <linkmauve@linkmauve.fr> | 2021-02-03 15:22:09 +0100 |
commit | e2224b938bc2a56053d59fa9671c5b77d1fc1b05 (patch) | |
tree | dc87cf74c5b73581f1f3080d5ed2175ab9e42cb8 | |
parent | df5a3d0de4d43a26bc14029b1d23d5b36865f153 (diff) | |
download | poezio-e2224b938bc2a56053d59fa9671c5b77d1fc1b05.tar.gz poezio-e2224b938bc2a56053d59fa9671c5b77d1fc1b05.tar.bz2 poezio-e2224b938bc2a56053d59fa9671c5b77d1fc1b05.tar.xz poezio-e2224b938bc2a56053d59fa9671c5b77d1fc1b05.zip |
private/conversationtabs: update /version to be without callback
-rw-r--r-- | poezio/tabs/conversationtab.py | 8 | ||||
-rw-r--r-- | poezio/tabs/privatetab.py | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/poezio/tabs/conversationtab.py b/poezio/tabs/conversationtab.py index 5d62fa5f..522e1d4d 100644 --- a/poezio/tabs/conversationtab.py +++ b/poezio/tabs/conversationtab.py @@ -217,19 +217,19 @@ class ConversationTab(OneToOneTab): return True @command_args_parser.quoted(0, 1) - def command_version(self, args): + async def command_version(self, args): """ /version [jid] """ if args: - return self.core.command.version(args[0]) + return await self.core.command.version(args[0]) jid = self.jid if not jid.resource: if jid in roster: resource = roster[jid].get_highest_priority_resource() jid = resource.jid if resource else jid - self.core.xmpp.plugin['xep_0092'].get_version( - jid, callback=self.core.handler.on_version_result) + iq = await self.core.xmpp.plugin['xep_0092'].get_version(jid) + self.core.handler.on_version_result(iq) def resize(self): self.need_resize = False diff --git a/poezio/tabs/privatetab.py b/poezio/tabs/privatetab.py index a59962e1..94a6ad34 100644 --- a/poezio/tabs/privatetab.py +++ b/poezio/tabs/privatetab.py @@ -184,15 +184,15 @@ class PrivateTab(OneToOneTab): self.cancel_paused_delay() @command_args_parser.quoted(0, 1) - def command_version(self, args): + async def command_version(self, args): """ /version """ if args: - return self.core.command.version(args[0]) + return await self.core.command.version(args[0]) jid = self.jid.full - self.core.xmpp.plugin['xep_0092'].get_version( - jid, callback=self.core.handler.on_version_result) + iq = await self.core.xmpp.plugin['xep_0092'].get_version(jid) + self.core.handler.on_version_result(iq) @command_args_parser.quoted(0, 1) def command_info(self, arg): |