Comparison

plugins/mod_pubsub.lua @ 3919:e288372dd19f

mod_pubsub: Use bare JID in get_affiliation
author Matthew Wild <mwild1@gmail.com>
date Tue, 21 Dec 2010 04:36:34 +0000
parent 3918:f30c5bad29b8
child 3932:aa245e43b21e
comparison
equal deleted inserted replaced
3918:f30c5bad29b8 3919:e288372dd19f
234 return true; 234 return true;
235 end); 235 end);
236 236
237 local admin_aff = module:get_option_string("default_admin_affiliation", "owner"); 237 local admin_aff = module:get_option_string("default_admin_affiliation", "owner");
238 local function get_affiliation(jid) 238 local function get_affiliation(jid)
239 if jid == module.host or usermanager.is_admin(jid, module.host) then 239 local bare_jid = jid_bare(jid);
240 if bare_jid == module.host or usermanager.is_admin(bare_jid, module.host) then
240 return admin_aff; 241 return admin_aff;
241 end 242 end
242 end 243 end
243 244
244 function set_service(new_service) 245 function set_service(new_service)