Commit e2224b93 authored by mathieui's avatar mathieui Committed by Link Mauve

private/conversationtabs: update /version to be without callback

parent df5a3d0d
......@@ -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
......
......@@ -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):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment