From a3c7989ba4d2d5f29e6a239d833cf5cfedc566fc Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Mon, 22 Oct 2007 08:54:07 +0000 Subject: [PATCH] discover correctly items that are discoverable. see #3479 --- src/disco.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/disco.py b/src/disco.py index d5974a5e8..7ffdd52d1 100644 --- a/src/disco.py +++ b/src/disco.py @@ -67,6 +67,7 @@ def _gen_agent_type_info(): # Jabber server ('server', 'im'): (ToplevelAgentBrowser, 'jabber.png'), ('services', 'jabber'): (ToplevelAgentBrowser, 'jabber.png'), + ('hierarchy', 'branch'): (AgentBrowser, 'jabber.png'), # Services ('conference', 'text'): (MucBrowser, 'conference.png'), @@ -953,6 +954,7 @@ _('This service does not contain any items to browse.')) disco#items query.''' self.model.append((jid, node, item.get('name', ''), get_agent_address(jid, node))) + self.cache.get_info(jid, node, self._agent_info, force = force) def _update_item(self, iter, jid, node, item): '''Called when an item should be updated in the model. The result of a @@ -963,7 +965,9 @@ _('This service does not contain any items to browse.')) def _update_info(self, iter, jid, node, identities, features, data): '''Called when an item should be updated in the model with further info. The result of a disco#info query.''' - self.model[iter][2] = identities[0].get('name', '') + name = identities[0].get('name', '') + if name: + self.model[iter][2] = name def _update_error(self, iter, jid, node): '''Called when a disco#info query failed for an item.'''