Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

revert: "fix(migration): pick one-on-one proteus conversation in alphabetically order for MLS migration (WPB-10259)" #3008

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,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 = ?;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1259,26 +1259,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
Expand Down
Loading