--- a/mod_storage_s3/mod_storage_s3.lua Sat Oct 14 21:44:14 2023 +0200
+++ b/mod_storage_s3/mod_storage_s3.lua Sat Oct 14 22:49:12 2023 +0200
@@ -218,6 +218,9 @@
local bucket_path = url.build_path({ is_absolute = true; bucket; is_directory = true });
local prefix = { jid.escape(module.host); jid.escape(self.store); is_directory = true };
table.insert(prefix, jid.escape(username or "@"));
+ if not query then
+ query = {};
+ end
if query["with"] then
table.insert(prefix, sha256(jid.prep(query["with"]), true):sub(1,24));
if query["start"] and query["end"] and dt.date(query["start"]) == dt.date(query["end"]) then