Software /
code /
prosody
Comparison
plugins/muc/muc.lib.lua @ 2051:2567f4bf0085
MUC: Fixed an issue with multi-session nicks where the 'from' attribute in a presence broadcast was not being properly set.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Sun, 25 Oct 2009 04:19:24 +0500 |
parent | 2035:b8c3dbf76a2e |
child | 2053:f5a198127dd3 |
comparison
equal
deleted
inserted
replaced
2050:adc1b92b8c6b | 2051:2567f4bf0085 |
---|---|
237 self:route_stanza(pr); | 237 self:route_stanza(pr); |
238 if jid ~= new_jid then | 238 if jid ~= new_jid then |
239 pr = st.clone(occupant.sessions[new_jid]) | 239 pr = st.clone(occupant.sessions[new_jid]) |
240 :tag("x", {xmlns='http://jabber.org/protocol/muc#user'}) | 240 :tag("x", {xmlns='http://jabber.org/protocol/muc#user'}) |
241 :tag("item", {affiliation=occupant.affiliation, role=occupant.role}); | 241 :tag("item", {affiliation=occupant.affiliation, role=occupant.role}); |
242 pr.attr.from = current_nick; | |
242 self:broadcast_except_nick(pr, current_nick); | 243 self:broadcast_except_nick(pr, current_nick); |
243 end | 244 end |
244 else | 245 else |
245 occupant.role = 'none'; | 246 occupant.role = 'none'; |
246 self:broadcast_presence(pr, from); | 247 self:broadcast_presence(pr, from); |