Просмотр исходного кода

Bugfix. Don't create occupants without nick/JID

JC Brand 6 лет назад
Родитель
Сommit
2f2b2ceaf2
2 измененных файлов с 2 добавлено и 2 удалено
  1. 1 1
      dist/converse.js
  2. 1 1
      src/converse-muc.js

+ 1 - 1
dist/converse.js

@@ -70817,7 +70817,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
            */
            */
           const data = this.parsePresence(pres);
           const data = this.parsePresence(pres);
 
 
-          if (data.type === 'error') {
+          if (data.type === 'error' || !data.jid && !data.nick) {
             return true;
             return true;
           }
           }
 
 

+ 1 - 1
src/converse-muc.js

@@ -806,7 +806,7 @@
                      *  (XMLElement) pres: The presence stanza
                      *  (XMLElement) pres: The presence stanza
                      */
                      */
                     const data = this.parsePresence(pres);
                     const data = this.parsePresence(pres);
-                    if (data.type === 'error') {
+                    if (data.type === 'error' || (!data.jid && !data.nick)) {
                         return true;
                         return true;
                     }
                     }
                     const occupant = this.occupants.findOccupant(data);
                     const occupant = this.occupants.findOccupant(data);