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

muc: remove callback for tab-specific /version

parent 23c17831
...@@ -1457,7 +1457,7 @@ class MucTab(ChatTab): ...@@ -1457,7 +1457,7 @@ class MucTab(ChatTab):
self.set_nick_color(nick, color) self.set_nick_color(nick, color)
@command_args_parser.quoted(1) @command_args_parser.quoted(1)
def command_version(self, args: List[str]) -> None: async def command_version(self, args: List[str]) -> None:
""" """
/version <jid or nick> /version <jid or nick>
""" """
...@@ -1466,7 +1466,7 @@ class MucTab(ChatTab): ...@@ -1466,7 +1466,7 @@ class MucTab(ChatTab):
return return
nick = args[0] nick = args[0]
try: try:
if nick in [user.nick for user in self.users]: if nick in {user.nick for user in self.users}:
jid = copy(self.jid) jid = copy(self.jid)
jid.resource = nick jid.resource = nick
else: else:
...@@ -1474,8 +1474,8 @@ class MucTab(ChatTab): ...@@ -1474,8 +1474,8 @@ class MucTab(ChatTab):
except InvalidJID: except InvalidJID:
self.core.information('Invalid jid or nick %r' % nick, 'Error') self.core.information('Invalid jid or nick %r' % nick, 'Error')
return return
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(1) @command_args_parser.quoted(1)
def command_nick(self, args: List[str]) -> None: def command_nick(self, args: List[str]) -> None:
......
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