Software /
code /
prosody
Comparison
plugins/mod_pubsub/mod_pubsub.lua @ 13202:173038306750
plugins: Use get_option_enum where appropriate
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 16 Jan 2021 21:04:58 +0100 |
parent | 12977:74b9e05af71e |
child | 13213:50324f66ca2a |
comparison
equal
deleted
inserted
replaced
13201:65fb0d7a2312 | 13202:173038306750 |
---|---|
177 for node, node_obj in pairs(ret) do | 177 for node, node_obj in pairs(ret) do |
178 reply:tag("item", { jid = module.host, node = node, name = node_obj.config.title }):up(); | 178 reply:tag("item", { jid = module.host, node = node, name = node_obj.config.title }):up(); |
179 end | 179 end |
180 end); | 180 end); |
181 | 181 |
182 local admin_aff = module:get_option_string("default_admin_affiliation", "owner"); | 182 local admin_aff = module:get_option_enum("default_admin_affiliation", "owner", "publisher", "member", "outcast", "none"); |
183 module:default_permission("prosody:admin", ":service-admin"); | 183 module:default_permission("prosody:admin", ":service-admin"); |
184 local function get_affiliation(jid) | 184 local function get_affiliation(jid) |
185 local bare_jid = jid_bare(jid); | 185 local bare_jid = jid_bare(jid); |
186 if bare_jid == module.host or module:may(":service-admin", bare_jid) then | 186 if bare_jid == module.host or module:may(":service-admin", bare_jid) then |
187 return admin_aff; | 187 return admin_aff; |