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): ...@@ -217,19 +217,19 @@ class ConversationTab(OneToOneTab):
return True return True
@command_args_parser.quoted(0, 1) @command_args_parser.quoted(0, 1)
def command_version(self, args): async def command_version(self, args):
""" """
/version [jid] /version [jid]
""" """
if args: if args:
return self.core.command.version(args[0]) return await self.core.command.version(args[0])
jid = self.jid jid = self.jid
if not jid.resource: if not jid.resource:
if jid in roster: if jid in roster:
resource = roster[jid].get_highest_priority_resource() resource = roster[jid].get_highest_priority_resource()
jid = resource.jid if resource else jid jid = resource.jid if resource else jid
self.core.xmpp.plugin['xep_0092'].get_version( iq = await self.core.xmpp.plugin['xep_0092'].get_version(jid)
jid, callback=self.core.handler.on_version_result) self.core.handler.on_version_result(iq)
def resize(self): def resize(self):
self.need_resize = False self.need_resize = False
......
...@@ -184,15 +184,15 @@ class PrivateTab(OneToOneTab): ...@@ -184,15 +184,15 @@ class PrivateTab(OneToOneTab):
self.cancel_paused_delay() self.cancel_paused_delay()
@command_args_parser.quoted(0, 1) @command_args_parser.quoted(0, 1)
def command_version(self, args): async def command_version(self, args):
""" """
/version /version
""" """
if args: if args:
return self.core.command.version(args[0]) return await self.core.command.version(args[0])
jid = self.jid.full jid = self.jid.full
self.core.xmpp.plugin['xep_0092'].get_version( iq = await self.core.xmpp.plugin['xep_0092'].get_version(jid)
jid, callback=self.core.handler.on_version_result) self.core.handler.on_version_result(iq)
@command_args_parser.quoted(0, 1) @command_args_parser.quoted(0, 1)
def command_info(self, arg): 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