Make E2EEConfig required
Previously it could be either undefined or type None which meant the same thing: no need to have both, just make it required. This also means we can move the line to set e2ee enabled into a more sensible place rather than in the ActiveCall de-nulling wrapper.
This commit is contained in:
@@ -249,11 +249,13 @@ export const GroupCallView: FC<Props> = ({
|
||||
}
|
||||
}, [isJoined, rtcSession]);
|
||||
|
||||
const e2eeConfig = useMemo((): E2EEConfig | undefined => {
|
||||
const e2eeConfig = useMemo((): E2EEConfig => {
|
||||
if (perParticipantE2EE) {
|
||||
return { mode: E2eeType.PER_PARTICIPANT };
|
||||
} else if (e2eeSharedKey) {
|
||||
return { mode: E2eeType.SHARED_KEY, sharedKey: e2eeSharedKey };
|
||||
} else {
|
||||
return { mode: E2eeType.NONE };
|
||||
}
|
||||
}, [perParticipantE2EE, e2eeSharedKey]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user