Mercurial > prosody-modules
diff mod_firewall/definitions.lib.lua @ 5650:0eb2d5ea2428
merge
| author | Stephen Paul Weber <singpolyma@singpolyma.net> |
|---|---|
| date | Sat, 06 May 2023 19:40:23 -0500 |
| parents | 7eec2bc67c26 |
| children | 0002c727e918 |
line wrap: on
line diff
--- a/mod_firewall/definitions.lib.lua Wed Feb 22 22:47:45 2023 -0500 +++ b/mod_firewall/definitions.lib.lua Sat May 06 19:40:23 2023 -0500 @@ -197,7 +197,11 @@ -- TODO Invent some custom schema for this? Needed for just a set of strings? pubsubitemid = { init = function(self, pubsub_spec, opts) - local service_addr, node = pubsub_spec:match("^([^/]*)/(.*)"); + local service_addr, node = pubsub_spec:match("^pubsubitemid:([^/]*)/(.*)"); + if not service_addr then + module:log("warn", "Invalid list specification (expected 'pubsubitemid:<service>/<node>', got: '%s')", pubsub_spec); + return; + end module:depends("pubsub_subscription"); module:add_item("pubsub-subscription", { service = service_addr;
