Преглед на файлове

fix: Save guards _features to be always empty and nver undefined. (#1493)

* fix: Save guards _features to be always empty and nver undefined.

* fix: Ignore caps changes relaying only on features in presence.
tags/v0.0.2
Дамян Минков преди 4 години
родител
ревизия
8bd4cb0c5b
No account linked to committer's email address
променени са 2 файла, в които са добавени 4 реда и са изтрити 2 реда
  1. 1
    1
      JitsiConferenceEventManager.js
  2. 3
    1
      modules/xmpp/Caps.js

+ 1
- 1
JitsiConferenceEventManager.js Целия файл

@@ -608,7 +608,7 @@ JitsiConferenceEventManager.prototype.setupXMPPListeners = function() {
608 608
         const participant = conference.getParticipantById(Strophe.getResourceFromJid(from));
609 609
 
610 610
         if (participant) {
611
-            participant._features = features;
611
+            participant._features = features || new Set();
612 612
             conference.eventEmitter.emit(JitsiConferenceEvents.PARTCIPANT_FEATURES_CHANGED, participant);
613 613
         }
614 614
     };

+ 3
- 1
modules/xmpp/Caps.js Целия файл

@@ -334,7 +334,9 @@ export default class Caps extends Listenable {
334 334
         this.jidToVersion[from] = { version,
335 335
             node };
336 336
         if (oldVersion && oldVersion.version !== version) {
337
-            this.eventEmitter.emit(XMPPEvents.PARTICIPANT_FEATURES_CHANGED, from);
337
+            // We should be receiving update of features in the presence <feature> node
338
+            // and ignore the caps version for disco-info
339
+            logger.warn(`Received update in caps for ${from}`);
338 340
         }
339 341
 
340 342
         // return true to not remove the handler from Strophe

Loading…
Отказ
Запис