Software /
code /
verse
Comparison
plugins/disco.lua @ 121:9b31ac5a37ea
plugins.disco: Further fixes to storing and retrieving to/from the disco cache
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 09 Sep 2010 19:27:46 +0100 |
parent | 120:47449a29d8ed |
child | 146:2678048e93e6 |
comparison
equal
deleted
inserted
replaced
120:47449a29d8ed | 121:9b31ac5a37ea |
---|---|
234 if not self.disco.cache[jid] then | 234 if not self.disco.cache[jid] then |
235 self.disco.cache[jid] = { nodes = {} }; | 235 self.disco.cache[jid] = { nodes = {} }; |
236 end | 236 end |
237 | 237 |
238 if node then | 238 if node then |
239 if not self.disco.cache.nodes[node] then | 239 if not self.disco.cache[jid].nodes[node] then |
240 self.disco.cache.nodes[node] = { nodes = {} }; | 240 self.disco.cache[jid].nodes[node] = { nodes = {} }; |
241 end | 241 end |
242 self.disco.cache.nodes[node].items = disco_items; | 242 self.disco.cache[jid].nodes[node].items = disco_items; |
243 else | 243 else |
244 self.disco.cache[jid].items = disco_items; | 244 self.disco.cache[jid].items = disco_items; |
245 end | 245 end |
246 return callback(disco_items); | 246 return callback(disco_items); |
247 end); | 247 end); |