From 0b7f511c864f4489ecbf42c0aac9847d57f49a21 Mon Sep 17 00:00:00 2001 From: KaterinaWire <57407805+KaterinaWire@users.noreply.github.com> Date: Thu, 2 Jul 2026 19:08:53 +0200 Subject: [PATCH] feat: 1:1 is not ending calls properly - WPB-26745 (#4952) --- .../Source/Calling/WireCallCenterV3.swift | 17 ----------- .../Calling/WireCallCenterV3Tests.swift | 28 ------------------- 2 files changed, 45 deletions(-) diff --git a/wire-ios-sync-engine/Source/Calling/WireCallCenterV3.swift b/wire-ios-sync-engine/Source/Calling/WireCallCenterV3.swift index edd7b1d51c1..ca69ee58d0d 100644 --- a/wire-ios-sync-engine/Source/Calling/WireCallCenterV3.swift +++ b/wire-ios-sync-engine/Source/Calling/WireCallCenterV3.swift @@ -895,8 +895,6 @@ public extension WireCallCenterV3 { snapshot?.mlsConferenceStaleParticipantsRemover?.stopSubscribing() snapshot?.mlsConferenceStaleParticipantsRemover = nil - guard isGroupConversation(conversationId: conversationId) else { return } - leaveSubconversation( parentQualifiedID: mlsParentIDs.0, parentGroupID: mlsParentIDs.1 @@ -904,21 +902,6 @@ public extension WireCallCenterV3 { } } - private func isGroupConversation(conversationId: AVSIdentifier) -> Bool { - guard - let context = uiMOC, - let domain = conversationId.domain ?? localDomain, - let conversation = ZMConversation.fetch( - with: conversationId.identifier, - domain: domain, - in: context - ) - else { - return false - } - return conversation.conversationType == .group - } - /// Rejects an incoming call in the conversation. /// - parameter conversationId: The ID of the conversation where the incoming call is hosted. diff --git a/wire-ios-sync-engine/Tests/Source/Calling/WireCallCenterV3Tests.swift b/wire-ios-sync-engine/Tests/Source/Calling/WireCallCenterV3Tests.swift index 2111468b51d..fedb2d4b8bc 100644 --- a/wire-ios-sync-engine/Tests/Source/Calling/WireCallCenterV3Tests.swift +++ b/wire-ios-sync-engine/Tests/Source/Calling/WireCallCenterV3Tests.swift @@ -679,34 +679,6 @@ final class WireCallCenterV3Tests: MessagingTest { XCTAssert(waitForCustomExpectations(withTimeout: 0.5)) } - func testThatClosingAnMLSOneOnOneCallDoesNotLeaveTheSubconversation() throws { - // Given - let conversationID = try XCTUnwrap(oneOnOneConversationID) - oneOnOneConversation.messageProtocol = .mls - oneOnOneConversation.mlsGroupID = .random() - - let mlsService = MockMLSServiceInterface() - syncMOC.performAndWait { - syncMOC.mlsService = mlsService - } - - var didLeaveSubconversation = false - mlsService - .leaveSubconversationParentQualifiedIDParentGroupIDSubconversationType_MockMethod = { _, _, _ in - didLeaveSubconversation = true - } - - // When - sut.closeCall(conversationId: conversationID) - - // Then - XCTAssert(waitForAllGroupsToBeEmpty(withTimeout: 0.5)) - XCTAssertFalse( - didLeaveSubconversation, - "leaveSubconversation should not be called for 1-1 MLS calls" - ) - } - func testThatItLeavesSubconversationIfNeededOnIncoming() throws { // Given groupConversation.messageProtocol = .mls