From ed2bd50e3836c4a01955cdaa7c91aee5a8872b03 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 17 Sep 2024 23:29:34 +0000 Subject: [PATCH] =?UTF-8?q?Revert=20"fix(migration):=20select=20proteus=20?= =?UTF-8?q?conversationId=20for=20mls=20migration=20in=20al=E2=80=A6"=20(#?= =?UTF-8?q?3008)=20(#3013)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 5cad6c80dedb9fcee7d2cd5651b07983ea5f1906. Co-authored-by: Mojtaba Chenani Co-authored-by: Mohamad Jaara --- .../wire/kalium/persistence/Conversations.sq | 3 +-- .../persistence/dao/ConversationDAOTest.kt | 20 ------------------- 2 files changed, 1 insertion(+), 22 deletions(-) diff --git a/persistence/src/commonMain/db_user/com/wire/kalium/persistence/Conversations.sq b/persistence/src/commonMain/db_user/com/wire/kalium/persistence/Conversations.sq index c7059434204..ebc0abcd3cb 100644 --- a/persistence/src/commonMain/db_user/com/wire/kalium/persistence/Conversations.sq +++ b/persistence/src/commonMain/db_user/com/wire/kalium/persistence/Conversations.sq @@ -325,8 +325,7 @@ WHERE qualifiedId = (SELECT active_one_on_one_conversation_id FROM User WHERE qu selectOneOnOneConversationIdsByProtocol: SELECT Member.conversation FROM Member JOIN Conversation ON Conversation.qualified_id = Member.conversation -WHERE Conversation.type = 'ONE_ON_ONE' AND Conversation.protocol = :protocol AND Member.user = :user -ORDER BY Member.conversation ASC; +WHERE Conversation.type = 'ONE_ON_ONE' AND Conversation.protocol = :protocol AND Member.user = :user; getConversationIdByGroupId: SELECT qualified_id FROM Conversation WHERE mls_group_id = ?; diff --git a/persistence/src/commonTest/kotlin/com/wire/kalium/persistence/dao/ConversationDAOTest.kt b/persistence/src/commonTest/kotlin/com/wire/kalium/persistence/dao/ConversationDAOTest.kt index 11639ba3680..36aaa92ae5f 100644 --- a/persistence/src/commonTest/kotlin/com/wire/kalium/persistence/dao/ConversationDAOTest.kt +++ b/persistence/src/commonTest/kotlin/com/wire/kalium/persistence/dao/ConversationDAOTest.kt @@ -1262,26 +1262,6 @@ class ConversationDAOTest : BaseDatabaseTest() { ) } - @Test - fun givenMultipleOneOnOneProteusConversationExisting_whenGettingOneOnOneConversationId_thenShouldReturnAlphabeticallyOrderedConversation() = - runTest { - // given - val conversationA = conversationEntity1.copy(id = QualifiedIDEntity("a", "wire.com")) - val conversationB = conversationEntity1.copy(id = QualifiedIDEntity("b", "wire.com")) - - userDAO.upsertUser(user1) - conversationDAO.insertConversation(conversationB) - conversationDAO.insertConversation(conversationA) - memberDAO.insertMember(member1, conversationB.id) - memberDAO.insertMember(member1, conversationA.id) - - // then - assertEquals( - conversationA.id, - conversationDAO.getOneOnOneConversationIdsWithOtherUser(user1.id, protocol = ConversationEntity.Protocol.PROTEUS).first() - ) - } - @Test fun givenNoMLSConversationExistsForGivenClients_whenGettingE2EIClientInfoByClientId_thenReturnsNull() = runTest { // given