Software /
code /
prosody-modules
Comparison
mod_firewall/definitions.lib.lua @ 5232:0f943619e01a
mod_firewall: Fix parsing of pubsubitemid list specification
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sat, 11 Mar 2023 16:40:09 +0000 |
parent | 4512:b88f05c878ac |
child | 5233:7eec2bc67c26 |
comparison
equal
deleted
inserted
replaced
5231:bef543068077 | 5232:0f943619e01a |
---|---|
195 -- Step 1: Receiving pubsub events and storing them in the list | 195 -- Step 1: Receiving pubsub events and storing them in the list |
196 -- We'll start by using only the item id. | 196 -- We'll start by using only the item id. |
197 -- TODO Invent some custom schema for this? Needed for just a set of strings? | 197 -- TODO Invent some custom schema for this? Needed for just a set of strings? |
198 pubsubitemid = { | 198 pubsubitemid = { |
199 init = function(self, pubsub_spec, opts) | 199 init = function(self, pubsub_spec, opts) |
200 local service_addr, node = pubsub_spec:match("^([^/]*)/(.*)"); | 200 local service_addr, node = pubsub_spec:match("^pubsubitemid:([^/]*)/(.*)"); |
201 module:depends("pubsub_subscription"); | 201 module:depends("pubsub_subscription"); |
202 module:add_item("pubsub-subscription", { | 202 module:add_item("pubsub-subscription", { |
203 service = service_addr; | 203 service = service_addr; |
204 node = node; | 204 node = node; |
205 on_subscribed = function () | 205 on_subscribed = function () |