mod_storage_s3: Fix querying for basic MAM parameters
authorKim Alvefur <zash@zash.se>
Mon, 27 Nov 2023 09:28:28 +0100
changeset 5739 9a1d8c39d0b0
parent 5738 cef8bce2d71b
child 5740 ba731ff5b895
mod_storage_s3: Fix querying for basic MAM parameters I guess I was planning to hash the 'with' part but changed my mind half way through implementing and also never tested this.
mod_storage_s3/mod_storage_s3.lua
--- a/mod_storage_s3/mod_storage_s3.lua	Mon Nov 27 07:10:06 2023 +0100
+++ b/mod_storage_s3/mod_storage_s3.lua	Mon Nov 27 09:28:28 2023 +0100
@@ -241,9 +241,9 @@
 		query = {};
 	end
 	if query["with"] then
-		table.insert(prefix, sha256(jid.prep(query["with"]), true):sub(1,24));
+		table.insert(prefix, jid.escape(jid.prep(query["with"]), true):sub(1,24));
 		if query["start"] and query["end"] and dt.date(query["start"]) == dt.date(query["end"]) then
-			table.insert(prefix, sha256(jid.prep(query["with"]), true):sub(1,24));
+			table.insert(prefix, dt.date(query["start"]));
 		end
 	end