# HG changeset patch # User Matthew Wild # Date 1284055887 -3600 # Node ID 989cb40f8e6257ddfa902566fe330cb41d729b25 # Parent d076948cd0e1cfefca28c518178d01c6e540883c plugins.disco: Fixes for storing/retrieving items from the disco cache. diff -r d076948cd0e1 -r 989cb40f8e62 plugins/disco.lua --- a/plugins/disco.lua Thu Sep 09 19:10:37 2010 +0100 +++ b/plugins/disco.lua Thu Sep 09 19:11:27 2010 +0100 @@ -107,6 +107,8 @@ disco_items = { features = {}, items = {} }; self.disco.nodes[node] = disco_items; disco_items = disco_items.items; + else + disco_items = disco_items.items; end end table.insert(disco_items, item); @@ -198,8 +200,8 @@ end if node then - if not self.disco.cache.nodes[node] then - self.disco.cache.nodes[node] = { nodes = {} }; + if not self.disco.cache[jid].nodes[node] then + self.disco.cache[jid].nodes[node] = { nodes = {} }; end self.disco.cache[jid].nodes[node].identities = identities; self.disco.cache[jid].nodes[node].features = features;