Software /
code /
prosody
Diff
plugins/mod_pubsub/mod_pubsub.lua @ 6666:42fdc8dddf04
Merge 0.10->trunk
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 06 May 2015 19:26:53 +0100 |
parent | 6516:ecd8d6437053 |
parent | 6657:f1af4edd5722 |
child | 6843:161cccfdf015 |
line wrap: on
line diff
--- a/plugins/mod_pubsub/mod_pubsub.lua Tue May 05 01:34:20 2015 +0200 +++ b/plugins/mod_pubsub/mod_pubsub.lua Wed May 06 19:26:53 2015 +0100 @@ -125,11 +125,15 @@ end); local admin_aff = module:get_option_string("default_admin_affiliation", "owner"); -local function get_affiliation(jid) +local unowned_aff = module:get_option_string("default_unowned_affiliation"); +local function get_affiliation(jid, node) local bare_jid = jid_bare(jid); if bare_jid == module.host or usermanager.is_admin(bare_jid, module.host) then return admin_aff; end + if not node then + return unowned_aff; + end end function set_service(new_service)