Software /
code /
prosody
Diff
plugins/mod_storage_memory.lua @ 9340:368b092bf4bf
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.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 22 Sep 2018 16:03:50 +0200 |
parent | 9293:0a751835627d |
child | 9468:bd5e4485a245 |
line wrap: on
line diff
--- a/plugins/mod_storage_memory.lua Sat Sep 22 15:34:26 2018 +0200 +++ b/plugins/mod_storage_memory.lua Sat Sep 22 16:03:50 2018 +0200 @@ -128,7 +128,7 @@ 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