Commit 7e42783c authored by JC Brand's avatar JC Brand

Don't remove requesting users when clearing the roster cache. updates #262

parent 8dedef70
...@@ -638,7 +638,9 @@ ...@@ -638,7 +638,9 @@
if (this.debug) { if (this.debug) {
this.connection.xmlInput = function (body) { console.log(body); }; this.connection.xmlInput = function (body) { console.log(body); };
this.connection.xmlOutput = function (body) { console.log(body); }; this.connection.xmlOutput = function (body) { console.log(body); };
Strophe.log = function (level, msg) { console.log(level+' '+msg); }; Strophe.log = function (level, msg) {
console.log(level+' '+msg);
};
Strophe.error = function (msg) { Strophe.error = function (msg) {
console.log('ERROR: '+msg); console.log('ERROR: '+msg);
}; };
...@@ -3473,14 +3475,15 @@ ...@@ -3473,14 +3475,15 @@
id = this.models[i].get('id'); id = this.models[i].get('id');
if (_.indexOf(_.pluck(items, 'jid'), id) === -1) { if (_.indexOf(_.pluck(items, 'jid'), id) === -1) {
contact = this.get(id); contact = this.get(id);
if (contact) { if (contact && !contact.get('requesting')) {
contact.destroy(); contact.destroy();
} }
} }
} }
}, },
rosterHandler: function (items) { // TODO: see if we can only use 2nd item par
rosterHandler: function (items, item) {
converse.emit('roster', items); converse.emit('roster', items);
this.clearCache(items); this.clearCache(items);
_.each(items, function (item, index, items) { _.each(items, function (item, index, items) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment