Software /
code /
prosody
Comparison
plugins/mod_muc.lua @ 817:e3e3919b6c7e
MUC: Fixed: Presence for user joining the roomi was sent twice to the user
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Tue, 17 Feb 2009 02:48:06 +0500 |
parent | 813:ebfb904640d8 |
child | 818:4dda65cd1405 |
comparison
equal
deleted
inserted
replaced
814:f12b1ddd458d | 817:e3e3919b6c7e |
---|---|
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'}) |