aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_storage_internal.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-09-04 14:39:31 +0200
committerKim Alvefur <zash@zash.se>2021-09-04 14:39:31 +0200
commitc6adacaaad810d70671d14316f652b772ccdfbcf (patch)
treeb4fc5e26cfd056e9cce0fe5b2cc136f5751c06a2 /plugins/mod_storage_internal.lua
parent6322b7c97e007cc563a29863d5a433a3141bd4ca (diff)
downloadprosody-c6adacaaad810d70671d14316f652b772ccdfbcf.tar.gz
prosody-c6adacaaad810d70671d14316f652b772ccdfbcf.zip
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.
Diffstat (limited to 'plugins/mod_storage_internal.lua')
-rw-r--r--plugins/mod_storage_internal.lua3
1 files changed, 1 insertions, 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