# HG changeset patch # User Kim Alvefur # Date 1630760164 -7200 # Node ID 98bf0f597df415f02598760ae78a5393109402e2 # Parent 1b81b7269858f927ea9ad60110acf121e6dc8247 mod_storage_xmlarchive: Stop exporting XEP-0091 timestamp in conversion diff -r 1b81b7269858 -r 98bf0f597df4 mod_storage_xmlarchive/mod_storage_xmlarchive.lua --- 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;