aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-09-22 16:03:50 +0200
committerKim Alvefur <zash@zash.se>2018-09-22 16:03:50 +0200
commitbeedd0937e4c5a97841be0148a55c059111aef7f (patch)
tree0bb3d0e6c2b2f603b95fbf95b403fe7de51dab4b
parentdc5efd855b1c94818822ba8fe1558f138dd48c25 (diff)
downloadprosody-beedd0937e4c5a97841be0148a55c059111aef7f.tar.gz
prosody-beedd0937e4c5a97841be0148a55c059111aef7f.zip
mod_storage_memory: Fix saving of remaining items during deletion
All data is compiled into functions that return new copies in order to prevent mutation of stored data. This has downsides. Also an ugly hack.
-rw-r--r--plugins/mod_storage_memory.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_storage_memory.lua b/plugins/mod_storage_memory.lua
index 8a95a587..49df48eb 100644
--- a/plugins/mod_storage_memory.lua
+++ b/plugins/mod_storage_memory.lua
@@ -128,7 +128,7 @@ function archive_store:delete(username, query)
i = old[i];
t = i.when;
if not(qstart >= t and qend <= t and (not qwith or i.with == qwith)) then
- self:append(username, i.key, i.value, t, i.with);
+ self:append(username, i.key, i.value(), t, i.with);
end
end
if #new == 0 then