Software /
code /
prosody
Diff
plugins/mod_storage_internal.lua @ 10842:5a6ba2f38e2b
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.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 15 May 2020 20:55:22 +0200 |
parent | 10837:f23363380599 |
child | 10844:05f4386c846e |
line wrap: on
line diff
--- a/plugins/mod_storage_internal.lua Thu May 14 16:55:01 2020 +0200 +++ b/plugins/mod_storage_internal.lua Fri May 15 20:55:22 2020 +0200 @@ -234,7 +234,7 @@ 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;