Skip to content

Commit

Permalink
chore: use backend config for 1 on 1 SFT calls (#18063)
Browse files Browse the repository at this point in the history
  • Loading branch information
V-Gira authored Sep 19, 2024
1 parent fb5b3b1 commit 49012ec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
9 changes: 3 additions & 6 deletions src/script/calling/CallingRepository.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,7 @@ describe('CallingRepository', () => {
});

describe('startCall', () => {
//FIXME: Unskip after hardcoded value is removed from CallingRepository.ts
it.skip.each([ConversationProtocol.PROTEUS, ConversationProtocol.MLS])(
it.each([ConversationProtocol.PROTEUS, ConversationProtocol.MLS])(
'starts a ONEONONE call for proteus or MLS 1:1 conversation',
async protocol => {
const conversation = createConversation(CONVERSATION_TYPE.ONE_TO_ONE, protocol);
Expand Down Expand Up @@ -297,8 +296,7 @@ describe('CallingRepository', () => {
);
});

//FIXME: Unskip after hardcoded value is removed from CallingRepository.ts
it.skip('does not subscribe to epoch updates after initiating a call in 1:1 mls conversation', async () => {
it('does not subscribe to epoch updates after initiating a call in 1:1 mls conversation', async () => {
const conversationId = {domain: 'example.com', id: 'conversation1'};

const groupId = 'groupId';
Expand Down Expand Up @@ -353,8 +351,7 @@ describe('CallingRepository', () => {
);
});

//FIXME: Unskip after hardcoded value is removed from CallingRepository.ts
it.skip('does not subscribe to epoch updates after answering a call in mls 1:1 conversation', async () => {
it('does not subscribe to epoch updates after answering a call in mls 1:1 conversation', async () => {
const conversationId = {domain: 'example.com', id: 'conversation2'};
const selfParticipant = createSelfParticipant();
const userId = {domain: '', id: ''};
Expand Down
7 changes: 3 additions & 4 deletions src/script/calling/CallingRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

import type {CallConfigData} from '@wireapp/api-client/lib/account/CallConfigData';
import {QualifiedUserClients} from '@wireapp/api-client/lib/conversation';
import {FEATURE_KEY} from '@wireapp/api-client/lib/team';
import type {QualifiedId} from '@wireapp/api-client/lib/user';
import type {WebappProperties} from '@wireapp/api-client/lib/user/data';
import {MessageSendingState} from '@wireapp/core/lib/conversation';
Expand Down Expand Up @@ -766,10 +767,8 @@ export class CallingRepository {
//##############################################################################

private getConversationType(conversation: Conversation): CONV_TYPE {
//FIXME: Remove this line when the feature flag is available on backend
const useSFTForOneToOneCalls = true;
// const useSFTForOneToOneCalls =
// this.teamState.teamFeatures()?.[FEATURE_KEY.CONFERENCE_CALLING]?.config?.useSFTForOneToOneCalls;
const useSFTForOneToOneCalls =
this.teamState.teamFeatures()?.[FEATURE_KEY.CONFERENCE_CALLING]?.config?.useSFTForOneToOneCalls;

if (conversation.isGroup() || useSFTForOneToOneCalls) {
if (isMLSConversation(conversation)) {
Expand Down

0 comments on commit 49012ec

Please sign in to comment.