Skip to content

Commit

Permalink
Prevent outbound group ring if the feature flag is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
EvanHahn-Signal committed Sep 7, 2021
1 parent 1b2a1a9 commit dac4c18
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ts/state/ducks/calling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -1253,6 +1254,7 @@ export function reducer(
...ringState,
};
outgoingRing =
isGroupCallOutboundRingEnabled() &&
!ringState.ringId &&
!call.peekInfo.uuids.length &&
!call.remoteParticipants.length &&
Expand Down

0 comments on commit dac4c18

Please sign in to comment.