From c6adacaaad810d70671d14316f652b772ccdfbcf Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sat, 4 Sep 2021 14:39:31 +0200 Subject: mod_storage_internal: Stop storing XEP-0091 timestamp Should no longer be used by anything since the conversion of mod_offline to the archive API in 0.10.0, which was 4 years ago. The line clearing the property is left for a bit longer in case someone has very old offline messages or archived data. --- plugins/mod_storage_internal.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/mod_storage_internal.lua b/plugins/mod_storage_internal.lua index 5d685ed9..fa87e495 100644 --- a/plugins/mod_storage_internal.lua +++ b/plugins/mod_storage_internal.lua @@ -66,7 +66,6 @@ function archive:append(username, key, value, when, with) value.when = when; value.with = with; value.attr.stamp = datetime.datetime(when); - value.attr.stamp_legacy = datetime.legacy(when); local cache_key = jid_join(username, host, self.store); local item_count = archive_item_count_cache:get(cache_key); @@ -219,6 +218,7 @@ function archive:find(username, query) local with = item.with; item.key, item.when, item.with = nil, nil, nil; item.attr.stamp = nil; + -- COMPAT Stored data may still contain legacy XEP-0091 timestamp item.attr.stamp_legacy = nil; item = st.deserialize(item); return key, item, when, with; @@ -256,7 +256,6 @@ function archive:set(username, key, new_value, new_when, new_with) item.when = when; item.with = new_with or old_item.with; item.attr.stamp = datetime.datetime(when); - item.attr.stamp_legacy = datetime.legacy(when); items[i] = item; return datamanager.list_store(username, host, self.store, items); end -- cgit v1.2.3