296 rooms:set(room, to, data); |
296 rooms:set(room, to, data); |
297 jid_nick:set(from, room, to); |
297 jid_nick:set(from, room, to); |
298 local r = rooms:get(room); |
298 local r = rooms:get(room); |
299 if r then |
299 if r then |
300 for occupant, o_data in pairs(r) do |
300 for occupant, o_data in pairs(r) do |
301 if occupant ~= from then |
301 if occupant ~= to then |
302 local pres = get_filtered_presence(o_data.sessions[o_data.jid]); |
302 local pres = get_filtered_presence(o_data.sessions[o_data.jid]); |
303 pres.attr.to, pres.attr.from = from, occupant; |
303 pres.attr.to, pres.attr.from = from, occupant; |
304 pres |
304 pres |
305 --local pres = st.presence({to=from, from=occupant}) |
305 --local pres = st.presence({to=from, from=occupant}) |
306 :tag("x", {xmlns='http://jabber.org/protocol/muc#user'}) |
306 :tag("x", {xmlns='http://jabber.org/protocol/muc#user'}) |