aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2020-05-15 20:55:22 +0200
committerKim Alvefur <zash@zash.se>2020-05-15 20:55:22 +0200
commit35836fec719c62b65ba73039552180c3085e0e80 (patch)
tree59de3908c95b1c65ede2ac695a19ee43eeaa2a0d /plugins
parent21af26d1a109f4e596d69df52aecc1b5755bbf94 (diff)
downloadprosody-35836fec719c62b65ba73039552180c3085e0e80.tar.gz
prosody-35836fec719c62b65ba73039552180c3085e0e80.zip
mod_storage_internal: Fix keeping old timestamp in archive map API
This led to a missing 'when' field on changed items, which would cause a traceack.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_storage_internal.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_storage_internal.lua b/plugins/mod_storage_internal.lua
index 586ea10f..472ec642 100644
--- a/plugins/mod_storage_internal.lua
+++ b/plugins/mod_storage_internal.lua
@@ -234,7 +234,7 @@ function archive:set(username, key, new_value, new_when, new_with)
if old_item.key == key then
local item = st.preserialize(st.clone(new_value));
- local when = new_when or item.when or datetime.parse(item.attr.stamp);
+ local when = new_when or old_item.when or datetime.parse(old_item.attr.stamp);
item.key = key;
item.when = when;
item.with = new_with or old_item.with;