mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 12:07:28 +00:00
Adapt to new DM definition changes in the SDK (#6748)
* Set `DmRoomDefinition.TwoPeople` in `ClientBuilder`. This applies the 'direct and with at most 2 non-service members' rule to what the SDK should consider a DM. * Map `RoomInfo.isDm` from the SDK * Map `NotificationData.isDm` from `NotificationInfo.roomInfo.isDm` * Remove `RoomIsDmCheck` file as its extension functions are now redundant. Move `Room.isDm` helper function to `BaseRoom`. * Map `isDm` in `SpaceRoom` from the SDK too * Replace `isDirect` with `isDm` where possible * Map `RoomMember.isServiceMember` from the SDK and use it to tell apart normal members of a room from service members (i.e. `RoomMembersState.getDirectRoomMember`)
This commit is contained in:
committed by
GitHub
parent
5e5e0bbc6e
commit
11476c73cf
+3
-3
@@ -540,7 +540,7 @@ internal class DefaultInvitePeoplePresenterTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `present - suggestions are loaded from recent direct rooms`() = runTest {
|
||||
fun `present - suggestions are loaded from recent DM rooms`() = runTest {
|
||||
val dmRoomId = RoomId("!dm_room:server.org")
|
||||
val otherUserId = UserId("@frank:server.org")
|
||||
val matrixClient = FakeMatrixClient(sessionId = A_USER_ID).apply {
|
||||
@@ -554,7 +554,7 @@ internal class DefaultInvitePeoplePresenterTest {
|
||||
roomId = dmRoomId,
|
||||
initialRoomInfo = aRoomInfo(
|
||||
id = dmRoomId,
|
||||
isDirect = true,
|
||||
isDm = true,
|
||||
activeMembersCount = 2,
|
||||
currentUserMembership = CurrentUserMembership.JOINED,
|
||||
),
|
||||
@@ -591,7 +591,7 @@ internal class DefaultInvitePeoplePresenterTest {
|
||||
roomId = dmRoomId,
|
||||
initialRoomInfo = aRoomInfo(
|
||||
id = dmRoomId,
|
||||
isDirect = true,
|
||||
isDm = true,
|
||||
activeMembersCount = 2,
|
||||
currentUserMembership = CurrentUserMembership.JOINED,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user