Comparison

util/muc.lua @ 1353:5f169bd454ca

util.muc: Relaxed top-level routing checks to allow node-less rooms, and removed redundant checks
author Waqas Hussain <waqas20@gmail.com>
date Sun, 14 Jun 2009 17:41:21 +0500
parent 1352:aad3ebce4fcc
child 1426:6ad9500a90a4
comparison
equal deleted inserted replaced
1352:aad3ebce4fcc 1353:5f169bd454ca
336 end 336 end
337 end 337 end
338 338
339 local function room_handle_stanza(self, origin, stanza) 339 local function room_handle_stanza(self, origin, stanza)
340 local to_node, to_host, to_resource = jid_split(stanza.attr.to); 340 local to_node, to_host, to_resource = jid_split(stanza.attr.to);
341 if to_resource and not to_node then 341 if to_resource then
342 if type == "error" or type == "result" then return; end
343 origin.send(st.error_reply(stanza, "cancel", "service-unavailable")); -- host/resource
344 elseif to_resource then
345 room_handle_to_occupant(self, origin, stanza); 342 room_handle_to_occupant(self, origin, stanza);
346 elseif to_node then 343 else
347 room_handle_to_room(self, origin, stanza) 344 room_handle_to_room(self, origin, stanza);
348 else -- to the main muc domain
349 end 345 end
350 end 346 end
351 347
352 module "muc" 348 module "muc"
353 349