Software /
code /
prosody
Comparison
plugins/mod_pubsub/pubsub.lib.lua @ 8932:12a9731aef0b
mod_pubsub: Add stubs for affiliation handling
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 26 Jun 2018 19:28:37 +0200 |
parent | 8826:d614003a82c1 |
child | 8933:6d3ecf9e8277 |
comparison
equal
deleted
inserted
replaced
8931:ae84911c1441 | 8932:12a9731aef0b |
---|---|
86 node_defaults = { "retrieve-default" }; | 86 node_defaults = { "retrieve-default" }; |
87 publish = { "publish" }; | 87 publish = { "publish" }; |
88 purge = { "purge-nodes" }; | 88 purge = { "purge-nodes" }; |
89 retract = { "delete-items", "retract-items" }; | 89 retract = { "delete-items", "retract-items" }; |
90 set_node_config = { "config-node" }; | 90 set_node_config = { "config-node" }; |
91 -- TODO -- set_affiliation = { "modify-affiliations" }; | |
91 }; | 92 }; |
92 local service_config_feature_map = { | 93 local service_config_feature_map = { |
93 autocreate_on_publish = { "auto-create" }; | 94 autocreate_on_publish = { "auto-create" }; |
94 }; | 95 }; |
95 | 96 |
451 :add_child(node_config_form:form(pubsub_form_data)); | 452 :add_child(node_config_form:form(pubsub_form_data)); |
452 origin.send(reply); | 453 origin.send(reply); |
453 return true; | 454 return true; |
454 end | 455 end |
455 | 456 |
457 --[[ TODO | |
458 function handlers.owner_get_affiliations(origin, stanza, affiliations, service) | |
459 end | |
460 | |
461 function handlers.owner_set_affiliations(origin, stanza, affiliations, service) | |
462 end | |
463 --]] | |
464 | |
456 local function create_encapsulating_item(id, payload) | 465 local function create_encapsulating_item(id, payload) |
457 local item = st.stanza("item", { id = id, xmlns = xmlns_pubsub }); | 466 local item = st.stanza("item", { id = id, xmlns = xmlns_pubsub }); |
458 item:add_child(payload); | 467 item:add_child(payload); |
459 return item; | 468 return item; |
460 end | 469 end |