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

fix(e2ee): enabled/supported flags calculation.

factor2
Hristo Terezov 2 лет назад
Родитель
Сommit
5a5656020b
1 измененных файлов: 7 добавлений и 4 удалений
  1. 7
    4
      react/features/base/participants/reducer.ts

+ 7
- 4
react/features/base/participants/reducer.ts Просмотреть файл

@@ -220,11 +220,14 @@ ReducerRegistry.register<IParticipantsState>('features/base/participants',
220 220
                 state.numberOfNonModeratorParticipants += isModerator ? -1 : 1;
221 221
             }
222 222
 
223
-            if (oldParticipant.e2eeEnabled !== newParticipant.e2eeEnabled) {
224
-                state.numberOfParticipantsDisabledE2EE += newParticipant.e2eeEnabled ? -1 : 1;
223
+            const e2eeEnabled = Boolean(newParticipant.e2eeEnabled);
224
+            const e2eeSupported = Boolean(newParticipant.e2eeSupported);
225
+
226
+            if (Boolean(oldParticipant.e2eeEnabled) !== e2eeEnabled) {
227
+                state.numberOfParticipantsDisabledE2EE += e2eeEnabled ? -1 : 1;
225 228
             }
226
-            if (!local && oldParticipant.e2eeSupported !== newParticipant.e2eeSupported) {
227
-                state.numberOfParticipantsNotSupportingE2EE += newParticipant.e2eeSupported ? -1 : 1;
229
+            if (!local && Boolean(oldParticipant.e2eeSupported) !== e2eeSupported) {
230
+                state.numberOfParticipantsNotSupportingE2EE += e2eeSupported ? -1 : 1;
228 231
             }
229 232
         }
230 233
 

Загрузка…
Отмена
Сохранить