# HG changeset patch # User Matthew Wild # Date 1753973021 -3600 # Node ID 093c47ee2041d044df472ab58f2e196311391a73 # Parent 1c0e9486ba23512fb970f018db287649e66d5904 mod_muc_rtbl: Simplify configuration and tweak docs diff -r 1c0e9486ba23 -r 093c47ee2041 mod_muc_rtbl/README.md --- a/mod_muc_rtbl/README.md Thu Jul 31 15:12:51 2025 +0100 +++ b/mod_muc_rtbl/README.md Thu Jul 31 15:43:41 2025 +0100 @@ -23,21 +23,26 @@ } ``` -Then you should configure one or more lists you want to subscribe to: +Then you should configure one or more lists you want to subscribe to, supplying +full or partial URIs (the default node is 'muc_bans_sha256' if unspecified): ```lua muc_rtbls = { + "rtbl.example"; + -- Equivalent to above "xmpp:rtbl.example?;node=muc_bans_sha256"; } ``` -If an unaffiliated JID matches an entry found in any of the configured lists, +If an unaffiliated JID matches an entry found in any of the configured RTBLs, this module will block: - Joins - Group chat messages - Private messages +from the JID that matched. + # Compatibility Should work with Prosody >= 0.12.x diff -r 1c0e9486ba23 -r 093c47ee2041 mod_muc_rtbl/mod_muc_rtbl.lua --- 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