Commit 96a9fb69 authored by louiz’'s avatar louiz’

Refactor a little thing in /version code

parent 059799bb
......@@ -304,13 +304,11 @@ class CommandCore:
return self.help('version')
jid = safeJID(args[0])
if jid.resource or jid not in roster:
if jid.resource or jid not in roster or not roster[jid].resources:
fixes.get_version(self.core.xmpp, jid, callback=callback)
elif jid in roster:
for resource in roster[jid].resources:
fixes.get_version(self.core.xmpp, resource.jid, callback=callback)
else:
fixes.get_version(self.core.xmpp, jid, callback=callback)
def _empty_join(self):
tab = self.core.current_tab()
......
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