aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2022-08-14 17:29:39 +0200
committerKim Alvefur <zash@zash.se>2022-08-14 17:29:39 +0200
commit50304f83fdb05d1fa56cd46215a248924b8642be (patch)
treeeb16d594fcceb16cb7b1eb99db2bd06773782078
parente2807b035edf7d5588dbe8359fc6c1e6b9adf178 (diff)
downloadprosody-50304f83fdb05d1fa56cd46215a248924b8642be.tar.gz
prosody-50304f83fdb05d1fa56cd46215a248924b8642be.zip
mod_storage_sql: Drop archive timestamp precision pending schema update
The "when" column is an INTEGER which will probably be unhappy about storing higher precision timestamps, so we keep the older behavior for now.
-rw-r--r--plugins/mod_storage_sql.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/mod_storage_sql.lua b/plugins/mod_storage_sql.lua
index 90a9316e..ca8b51ac 100644
--- a/plugins/mod_storage_sql.lua
+++ b/plugins/mod_storage_sql.lua
@@ -321,7 +321,8 @@ function archive_store:append(username, key, value, when, with)
end
end
- when = when or os.time();
+ -- FIXME update the schema to allow precision timestamps
+ when = when and math.floor(when) or os.time();
with = with or "";
local ok, ret = engine:transaction(function()
local delete_sql = [[