Mercurial > prosody-modules
comparison mod_storage_s3/mod_storage_s3.lua @ 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 | b6518a71ca7e |
children | ba731ff5b895 |
comparison
equal
deleted
inserted
replaced
5734:cef8bce2d71b | 5735:9a1d8c39d0b0 |
---|---|
239 table.insert(prefix, jid.escape(username or "@")); | 239 table.insert(prefix, jid.escape(username or "@")); |
240 if not query then | 240 if not query then |
241 query = {}; | 241 query = {}; |
242 end | 242 end |
243 if query["with"] then | 243 if query["with"] then |
244 table.insert(prefix, sha256(jid.prep(query["with"]), true):sub(1,24)); | 244 table.insert(prefix, jid.escape(jid.prep(query["with"]), true):sub(1,24)); |
245 if query["start"] and query["end"] and dt.date(query["start"]) == dt.date(query["end"]) then | 245 if query["start"] and query["end"] and dt.date(query["start"]) == dt.date(query["end"]) then |
246 table.insert(prefix, sha256(jid.prep(query["with"]), true):sub(1,24)); | 246 table.insert(prefix, dt.date(query["start"])); |
247 end | 247 end |
248 end | 248 end |
249 | 249 |
250 prefix = url.build_path(prefix); | 250 prefix = url.build_path(prefix); |
251 local list_result, err = async.wait_for(new_request(self, "GET", bucket_path, { | 251 local list_result, err = async.wait_for(new_request(self, "GET", bucket_path, { |