Software /
code /
prosody-modules
Diff
mod_storage_s3/mod_storage_s3.lua @ 5697:51d0311747fa
mod_storage_s3: Handle archive query without parameters
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 14 Oct 2023 22:49:12 +0200 |
parent | 5696:b17ba149b7c5 |
child | 5698:17ea26cf7259 |
line wrap: on
line diff
--- 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