mod_storage_s3: Fix storing archives for host itself (e.g. mod_audit)
Fixes error due to path constructor trying to do string.gsub(nil) with
missing username or with fields.
--- a/mod_storage_s3/mod_storage_s3.lua Wed Nov 22 11:54:22 2023 +0000
+++ b/mod_storage_s3/mod_storage_s3.lua Wed Nov 22 12:56:50 2023 +0100
@@ -206,8 +206,8 @@
bucket;
jid.escape(module.host);
jid.escape(self.store);
- jid.escape(username);
- jid.escape(jid.prep(with));
+ jid.escape(username or "@");
+ jid.escape(with and jid.prep(with) or "@");
date or dt.date(when);
key;
})