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); |