From 3275bb9f9ba4377cfedb1e8b987202b765cfec21 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Sat, 25 Mar 2006 00:46:42 +0000 Subject: [PATCH] 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 --- src/common/connection_handlers.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/common/connection_handlers.py b/src/common/connection_handlers.py index 5a1c2a6b6..9cdc6fd9d 100644 --- a/src/common/connection_handlers.py +++ b/src/common/connection_handlers.py @@ -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):