Prevent outbound group ring if the feature flag is disabled

This commit is contained in:
Evan Hahn 2021-09-07 11:20:13 -05:00 committed by GitHub
parent c6278aa173
commit bae84b6b67
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -29,6 +29,7 @@ import {
} from '../../types/Calling';
import { callingTones } from '../../util/callingTones';
import { requestCameraPermissions } from '../../util/callingPermissions';
import { isGroupCallOutboundRingEnabled } from '../../util/isGroupCallOutboundRingEnabled';
import { sleep } from '../../util/sleep';
import { LatestQueue } from '../../util/LatestQueue';
import type { ConversationChangedActionType } from './conversations';
@ -1077,7 +1078,7 @@ function startCall(
const state = getState();
const { activeCallState } = state.calling;
if (activeCallState?.outgoingRing) {
if (isGroupCallOutboundRingEnabled() && activeCallState?.outgoingRing) {
const conversation = getOwn(
state.conversations.conversationLookup,
activeCallState.conversationId
@ -1253,6 +1254,7 @@ export function reducer(
...ringState,
};
outgoingRing =
isGroupCallOutboundRingEnabled() &&
!ringState.ringId &&
!call.peekInfo.uuids.length &&
!call.remoteParticipants.length &&