Consider own join time for group call missing media key check

Co-authored-by: Jamie Kyle <113370520+jamiebuilds-signal@users.noreply.github.com>
This commit is contained in:
ayumi-signal 2024-11-01 14:12:49 -07:00 committed by GitHub
parent f9b2261783
commit ec9041937f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 82 additions and 15 deletions

View file

@ -3408,14 +3408,22 @@ export function reducer(
state.activeCallState?.state === 'Active' &&
state.activeCallState?.conversationId === conversationId
) {
newActiveCallState =
connectionState === GroupCallConnectionState.NotConnected
? undefined
: {
...state.activeCallState,
hasLocalAudio,
hasLocalVideo,
};
if (connectionState === GroupCallConnectionState.NotConnected) {
newActiveCallState = undefined;
} else {
const joinedAt =
state.activeCallState.joinedAt ??
(connectionState === GroupCallConnectionState.Connected
? new Date().getTime()
: null);
newActiveCallState = {
...state.activeCallState,
hasLocalAudio,
hasLocalVideo,
joinedAt,
};
}
// The first time we detect call participants in the lobby, check participant count
// and mute ourselves if over the threshold.