Don't unnecessarily create objects for roster items

This commit is contained in:
JC Brand 2013-10-19 18:24:06 +02:00
parent 3d84b3e7ae
commit fd349b217f

View File

@ -2191,6 +2191,10 @@
if (this.isSelf(item.jid)) { return; }
var model = this.get(item.jid);
if (!model) {
if ((item.subscription === 'none') && (item.ask === null)) {
// We're not interested in zombies
return;
}
is_last = false;
if (index === (items.length-1)) { is_last = true; }
this.create({