Comparison

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
comparison
equal deleted inserted replaced
6650:cf15b18e9810 6666:42fdc8dddf04
123 reply:tag("item", { jid = module.host, node = node, name = node_obj.config.name }):up(); 123 reply:tag("item", { jid = module.host, node = node, name = node_obj.config.name }):up();
124 end 124 end
125 end); 125 end);
126 126
127 local admin_aff = module:get_option_string("default_admin_affiliation", "owner"); 127 local admin_aff = module:get_option_string("default_admin_affiliation", "owner");
128 local function get_affiliation(jid) 128 local unowned_aff = module:get_option_string("default_unowned_affiliation");
129 local function get_affiliation(jid, node)
129 local bare_jid = jid_bare(jid); 130 local bare_jid = jid_bare(jid);
130 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
131 return admin_aff; 132 return admin_aff;
133 end
134 if not node then
135 return unowned_aff;
132 end 136 end
133 end 137 end
134 138
135 function set_service(new_service) 139 function set_service(new_service)
136 service = new_service; 140 service = new_service;