Changeset

4671:98bf0f597df4

mod_storage_xmlarchive: Stop exporting XEP-0091 timestamp in conversion
author Kim Alvefur <zash@zash.se>
date Sat, 04 Sep 2021 14:56:04 +0200
parents 4670:1b81b7269858
children 4672:0b084f63fed0
files mod_storage_xmlarchive/mod_storage_xmlarchive.lua
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_storage_xmlarchive/mod_storage_xmlarchive.lua	Thu Sep 02 23:06:58 2021 +0200
+++ b/mod_storage_xmlarchive/mod_storage_xmlarchive.lua	Sat Sep 04 14:56:04 2021 +0200
@@ -492,7 +492,6 @@
 						data.with = item.with;
 						data.when = tonumber(item.when) or dt.parse(item.when);
 						data.attr.stamp = item.when;
-						data.attr.stamp_legacy = dt.legacy(data.when);
 						assert(dm.list_append(user, host, store, data));
 					end
 					assert(os.remove(dm.getpath(user .. "@" .. date, host, store, "list")));
@@ -525,6 +524,10 @@
 						table.insert(dates, date);
 						xmlfile = assert(io.open(dm.getpath(user .. "@" .. date, host, store, "xml"), "w"));
 					end
+					-- The property 'stamp_legacy' originally came from mod_offline and
+					-- was inherited into the mod_storage_internal archive format for
+					-- compat. It should not be needed since Prosody 0.10.0 but could
+					-- exist in older data.
 					item.attr.stamp, item.attr.stamp_legacy = nil, nil;
 					local stanza = tostring(st.deserialize(item)) .. "\n";
 					meta.offset, meta.length = xmlfile:seek(), #stanza;