workaround for ejabberd bug: it returns disco#info without an indentity. JEP0030 says it's a MUST. We can now browse online / all / offline users. Fixes #865

This commit is contained in:
Yann Leboulanger 2006-03-25 00:46:42 +00:00
parent c9bdf56da7
commit 3275bb9f9b
1 changed files with 8 additions and 6 deletions

View File

@ -708,12 +708,14 @@ class ConnectionDisco:
data.append(common.xmpp.DataForm(node=i))
jid = helpers.get_full_jid_from_iq(iq_obj)
id = iq_obj.getID()
if identities: #if not: an error occured
if id[0] == 'p':
if features.__contains__(common.xmpp.NS_BYTESTREAM):
gajim.proxy65_manager.resolve(jid, self.connection, self.name)
self.dispatch('AGENT_INFO_INFO', (jid, node, identities,
features, data))
if not identities: # ejabberd doesn't send identities when we browse online users
#FIXME: see http://www.jabber.ru/bugzilla/show_bug.cgi?id=225
identities = [{'category': 'server', 'type': 'im', 'name': node}]
if id[0] == 'p':
if features.__contains__(common.xmpp.NS_BYTESTREAM):
gajim.proxy65_manager.resolve(jid, self.connection, self.name)
self.dispatch('AGENT_INFO_INFO', (jid, node, identities,
features, data))
class ConnectionVcard:
def __init__(self):