Mercurial > prosody-modules
diff mod_muc_rtbl/mod_muc_rtbl.lua @ 6306:093c47ee2041
mod_muc_rtbl: Simplify configuration and tweak docs
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Thu, 31 Jul 2025 15:43:41 +0100 |
| parents | 6e2458b69e33 |
| children |
line wrap: on
line diff
--- a/mod_muc_rtbl/mod_muc_rtbl.lua Thu Jul 31 15:12:51 2025 +0100 +++ b/mod_muc_rtbl/mod_muc_rtbl.lua Thu Jul 31 15:43:41 2025 +0100 @@ -23,7 +23,7 @@ local function parse_xmpp_uri(uri) local parsed = url.parse(uri); - if parsed.scheme ~= "xmpp" then + if parsed.scheme and parsed.scheme ~= "xmpp" then return nil, "unexpected-scheme"; end @@ -42,7 +42,7 @@ for _, rtbl_uri in ipairs(rtbl_config) do local uri = parse_xmpp_uri(rtbl_uri); module:log("debug", "Subscribing to %q node %q", uri.jid, uri.params.node); - local rtbl = mod_rtbl.new_rtbl_subscription(uri.jid, uri.params.node, {}); + local rtbl = mod_rtbl.new_rtbl_subscription(uri.jid, uri.params.node or "muc_bans_sha256", {}); table.insert(lists, rtbl); end
