|
|
@@ -577,15 +577,12 @@ ChatRoom.prototype.addToPresence = function (key, values) {
|
|
577
|
577
|
values.tagName = key;
|
|
578
|
578
|
this.removeFromPresence(key);
|
|
579
|
579
|
this.presMap.nodes.push(values);
|
|
580
|
|
- this.presMap["nodes"].push(values);
|
|
581
|
580
|
};
|
|
582
|
581
|
|
|
583
|
582
|
ChatRoom.prototype.removeFromPresence = function (key) {
|
|
584
|
|
- for(var i = 0; i < this.presMap.nodes.length; i++)
|
|
585
|
|
- {
|
|
586
|
|
- if(key === this.presMap.nodes[i].tagName)
|
|
587
|
|
- this.presMap.nodes.splice(i, 1);
|
|
588
|
|
- }
|
|
|
583
|
+ var nodes = this.presMap.nodes.filter(function(node) {
|
|
|
584
|
+ return key !== node.tagName;});
|
|
|
585
|
+ this.presMap.nodes = nodes;
|
|
589
|
586
|
};
|
|
590
|
587
|
|
|
591
|
588
|
ChatRoom.prototype.addPresenceListener = function (name, handler) {
|