changeset 5735:9a1d8c39d0b0

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.
author Kim Alvefur <zash@zash.se>
date Mon, 27 Nov 2023 09:28:28 +0100
parents cef8bce2d71b
children ba731ff5b895
files mod_storage_s3/mod_storage_s3.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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