Selaa lähdekoodia

Don't unnecessarily create objects for roster items

JC Brand 11 vuotta sitten
vanhempi
commit
fd349b217f
1 muutettua tiedostoa jossa 4 lisäystä ja 0 poistoa
  1. 4 0
      converse.js

+ 4 - 0
converse.js

@@ -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({