Software /
code /
verse
Diff
plugins/disco.lua @ 119:989cb40f8e62
plugins.disco: Fixes for storing/retrieving items from the disco cache.
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 09 Sep 2010 19:11:27 +0100 |
parent | 115:9f8cacfca7c7 |
child | 120:47449a29d8ed |
line wrap: on
line diff
--- 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;