Software /
code /
prosody
Comparison
util/pubsub.lua @ 7726:29c20eefa306
util.pubsub: Fix item retrieval by including the item order as it was before using util.cache (thanks walduhu)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 19 Nov 2016 17:34:54 +0100 |
parent | 7703:74e755674e0f |
child | 7727:0011889c928f |
comparison
equal
deleted
inserted
replaced
7722:82333dfdfaff | 7726:29c20eefa306 |
---|---|
329 if id then -- Restrict results to a single specific item | 329 if id then -- Restrict results to a single specific item |
330 return true, { id, [id] = self.data[node]:get(id) }; | 330 return true, { id, [id] = self.data[node]:get(id) }; |
331 else | 331 else |
332 local data = {} | 332 local data = {} |
333 for key, value in self.data[node]:items() do | 333 for key, value in self.data[node]:items() do |
334 data[#data+1] = key; | |
334 data[key] = value; | 335 data[key] = value; |
335 end | 336 end |
336 return true, data; | 337 return true, data; |
337 end | 338 end |
338 end | 339 end |