Mercurial > prosody-hg
comparison plugins/mod_pubsub/mod_pubsub.lua @ 7708:c420a38db5ef
Backed out changeset f1af4edd5722, doesn't work as intended (node is the name of the node and always present)
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Tue, 18 Oct 2016 22:47:26 +0200 |
| parents | be87ab2d611c |
| children | 9c8eb0239eef 241f02bd66ce |
comparison
equal
deleted
inserted
replaced
| 7703:74e755674e0f | 7708:c420a38db5ef |
|---|---|
| 124 reply:tag("item", { jid = module.host, node = node, name = node_obj.config.name }):up(); | 124 reply:tag("item", { jid = module.host, node = node, name = node_obj.config.name }):up(); |
| 125 end | 125 end |
| 126 end); | 126 end); |
| 127 | 127 |
| 128 local admin_aff = module:get_option_string("default_admin_affiliation", "owner"); | 128 local admin_aff = module:get_option_string("default_admin_affiliation", "owner"); |
| 129 local unowned_aff = module:get_option_string("default_unowned_affiliation"); | 129 local function get_affiliation(jid) |
| 130 local function get_affiliation(jid, node) | |
| 131 local bare_jid = jid_bare(jid); | 130 local bare_jid = jid_bare(jid); |
| 132 if bare_jid == module.host or usermanager.is_admin(bare_jid, module.host) then | 131 if bare_jid == module.host or usermanager.is_admin(bare_jid, module.host) then |
| 133 return admin_aff; | 132 return admin_aff; |
| 134 end | |
| 135 if not node then | |
| 136 return unowned_aff; | |
| 137 end | 133 end |
| 138 end | 134 end |
| 139 | 135 |
| 140 function set_service(new_service) | 136 function set_service(new_service) |
| 141 service = new_service; | 137 service = new_service; |
