core/moduleapi.lua
changeset 12656 30e2a0107217
parent 12655 1ce98f27eabe
child 12666 07424992d7fc
equal deleted inserted replaced
12655:1ce98f27eabe 12656:30e2a0107217
   643 		end
   643 		end
   644 		return permit;
   644 		return permit;
   645 	end
   645 	end
   646 
   646 
   647 	local session = context.origin or context.session;
   647 	local session = context.origin or context.session;
   648 	if not session then
   648 	if type(session) ~= "table" then
   649 		error("Unable to identify actor session from context");
   649 		error("Unable to identify actor session from context");
   650 	end
   650 	end
   651 	if session.type == "s2sin" or (session.type == "c2s" and session.host ~= self.host) then
   651 	if session.type == "s2sin" or (session.type == "c2s" and session.host ~= self.host) then
   652 		local actor_jid = context.stanza.attr.from;
   652 		local actor_jid = context.stanza.attr.from;
   653 		local role = hosts[self.host].authz.get_jid_role(actor_jid);
   653 		local role = hosts[self.host].authz.get_jid_role(actor_jid);