88 && Strophe.getBareJidFromJid(stanza.getAttribute("from")) == this.jid) |
88 && Strophe.getBareJidFromJid(stanza.getAttribute("from")) == this.jid) |
89 if(!this.occupants[nick]) |
89 if(!this.occupants[nick]) |
90 { |
90 { |
91 var text = stanza.getElementsByTagName("status")[0]; |
91 var text = stanza.getElementsByTagName("status")[0]; |
92 if(text) text = Strophe.getText(text); |
92 if(text) text = Strophe.getText(text); |
93 this.occupants[nick] = {}; |
93 this.occupants[nick] = { nick: nick, status: text }; |
|
94 var item = get_child(stanza, "x", "http://jabber.org/protocol/muc#user"); |
|
95 if(item) |
|
96 { |
|
97 item = item.getElementsByTagName("item")[0]; |
|
98 this.occupants[nick].affiliation = item.getAttribute("affiliation"); |
|
99 this.occupants[nick].role = item.getAttribute("role"); |
|
100 } |
94 if(this.callbacks.joined) |
101 if(this.callbacks.joined) |
95 this.callbacks.joined(stanza, this, nick, text); |
102 this.callbacks.joined(stanza, this, this.occupants[nick]); |
96 if(this.status_handler) |
103 if(this.status_handler) |
97 { |
104 { |
98 this.status_handler(stanza); |
105 this.status_handler(stanza); |
99 } |
106 } |
100 } |
107 } |