Software /
code /
prosody
Comparison
plugins/mod_pubsub/pubsub.lib.lua @ 10062:6ffed67356e9
mod_pubsub: Expose pubsub#access_model and pubsub#publish_model (fixes #1387)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 06 Jul 2019 17:47:06 +0200 |
parent | 9817:7aad9eb7f050 |
child | 10090:cdcf26331b9f |
comparison
equal
deleted
inserted
replaced
10061:5c71693c8345 | 10062:6ffed67356e9 |
---|---|
183 }; | 183 }; |
184 { | 184 { |
185 type = "text-single"; | 185 type = "text-single"; |
186 name = "pubsub#type"; | 186 name = "pubsub#type"; |
187 }; | 187 }; |
188 { | |
189 type = "text-single"; | |
190 name = "pubsub#access_model"; | |
191 }; | |
192 { | |
193 type = "text-single"; | |
194 name = "pubsub#publish_model"; | |
195 }; | |
188 }; | 196 }; |
189 | 197 |
190 local service_method_feature_map = { | 198 local service_method_feature_map = { |
191 add_subscription = { "subscribe", "subscription-options" }; | 199 add_subscription = { "subscribe", "subscription-options" }; |
192 create = { "create-nodes", "instant-nodes", "item-ids", "create-and-configure" }; | 200 create = { "create-nodes", "instant-nodes", "item-ids", "create-and-configure" }; |
256 if node_obj.config then | 264 if node_obj.config then |
257 reply:add_child(node_metadata_form:form({ | 265 reply:add_child(node_metadata_form:form({ |
258 ["pubsub#title"] = node_obj.config.title; | 266 ["pubsub#title"] = node_obj.config.title; |
259 ["pubsub#description"] = node_obj.config.description; | 267 ["pubsub#description"] = node_obj.config.description; |
260 ["pubsub#type"] = node_obj.config.payload_type; | 268 ["pubsub#type"] = node_obj.config.payload_type; |
269 ["pubsub#access_model"] = node_obj.config.access_model; | |
270 ["pubsub#publish_model"] = node_obj.config.publish_model; | |
261 }, "result")); | 271 }, "result")); |
262 end | 272 end |
263 end | 273 end |
264 | 274 |
265 function _M.handle_disco_items_node(event, service) | 275 function _M.handle_disco_items_node(event, service) |