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.
--- 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