Explorar el Código

Don't unnecessarily create objects for roster items

JC Brand hace 11 años
padre
commit
fd349b217f
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  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({