Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(e2ee): enabled/supported flags calculation.

Hristo Terezov5a5656020baf
diff --git a/react/features/base/participants/reducer.ts b/react/features/base/participants/reducer.ts
index f1f30741e5..a122d14497 100644
--- a/react/features/base/participants/reducer.ts
+++ b/react/features/base/participants/reducer.ts
@@ -220,11 +220,14 @@ ReducerRegistry.register<IParticipantsState>('features/base/participants',
state.numberOfNonModeratorParticipants += isModerator ? -1 : 1;
}
- if (oldParticipant.e2eeEnabled !== newParticipant.e2eeEnabled) {
- state.numberOfParticipantsDisabledE2EE += newParticipant.e2eeEnabled ? -1 : 1;
+ const e2eeEnabled = Boolean(newParticipant.e2eeEnabled);
+ const e2eeSupported = Boolean(newParticipant.e2eeSupported);
+
+ if (Boolean(oldParticipant.e2eeEnabled) !== e2eeEnabled) {
+ state.numberOfParticipantsDisabledE2EE += e2eeEnabled ? -1 : 1;
}
- if (!local && oldParticipant.e2eeSupported !== newParticipant.e2eeSupported) {
- state.numberOfParticipantsNotSupportingE2EE += newParticipant.e2eeSupported ? -1 : 1;
+ if (!local && Boolean(oldParticipant.e2eeSupported) !== e2eeSupported) {
+ state.numberOfParticipantsNotSupportingE2EE += e2eeSupported ? -1 : 1;
}
}