mod_storage_internal: Stop storing XEP-0091 timestamp
authorKim Alvefur <zash@zash.se>
Sat, 04 Sep 2021 14:39:31 +0200
changeset 11769 1cac469b18d0
parent 11768 e2650d59db2d
child 11770 6ad335cd43f9
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
--- a/plugins/mod_storage_internal.lua	Fri Sep 03 17:46:55 2021 +0200
+++ b/plugins/mod_storage_internal.lua	Sat Sep 04 14:39:31 2021 +0200
@@ -66,7 +66,6 @@
 	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 @@
 		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 @@
 			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