|
@@ -123,6 +123,13 @@ Strophe.addConnectionPlugin('emuc', {
|
123
|
123
|
member.affiliation = tmp.attr('affiliation');
|
124
|
124
|
member.role = tmp.attr('role');
|
125
|
125
|
|
|
126
|
+ // Focus recognition
|
|
127
|
+ member.jid = tmp.attr('jid');
|
|
128
|
+ member.isFocus = false;
|
|
129
|
+ if (member.jid && member.jid.indexOf(config.focusUserJid + "/") == 0) {
|
|
130
|
+ member.isFocus = true;
|
|
131
|
+ }
|
|
132
|
+
|
126
|
133
|
var nicktag = $(pres).find('>nick[xmlns="http://jabber.org/protocol/nick"]');
|
127
|
134
|
member.displayName = (nicktag.length > 0 ? nicktag.text() : null);
|
128
|
135
|
|
|
@@ -167,11 +174,7 @@ Strophe.addConnectionPlugin('emuc', {
|
167
|
174
|
if (!$(pres).find('>x[xmlns="http://jabber.org/protocol/muc#user"]>status[code="110"]').length) {
|
168
|
175
|
delete this.members[from];
|
169
|
176
|
this.list_members.splice(this.list_members.indexOf(from), 1);
|
170
|
|
- if ($(pres).find('>x[xmlns="http://jabber.org/protocol/muc#user"]>status[code="307"]').length) {
|
171
|
|
- $(document).trigger('kicked.muc', [from]);
|
172
|
|
- } else {
|
173
|
|
- $(document).trigger('left.muc', [from]);
|
174
|
|
- }
|
|
177
|
+ $(document).trigger('left.muc', [from]);
|
175
|
178
|
}
|
176
|
179
|
// If the status code is 110 this means we're leaving and we would like
|
177
|
180
|
// to remove everyone else from our view, so we trigger the event.
|
|
@@ -183,6 +186,9 @@ Strophe.addConnectionPlugin('emuc', {
|
183
|
186
|
$(document).trigger('left.muc', member);
|
184
|
187
|
}
|
185
|
188
|
}
|
|
189
|
+ if ($(pres).find('>x[xmlns="http://jabber.org/protocol/muc#user"]>status[code="307"]').length) {
|
|
190
|
+ $(document).trigger('kicked.muc', [from]);
|
|
191
|
+ }
|
186
|
192
|
return true;
|
187
|
193
|
},
|
188
|
194
|
onPresenceError: function (pres) {
|