element-hq / element-hq/element-x-android

[Task] Unify the way we decide when a room is actually a DM

Open
#3,078 1 comment 3 reactions 1 assignee Claimed by @jmartinesp View on GitHub
T-Task
Dominant language
Kotlin
Stars
2.4k
Forks
624
Avg merge
1d 14h
Merged PRs (30d)
149

Description

Some time ago we took a decision to enforce DMs being only "direct rooms with at most 2 users, encrypted".

As we developed the app, we apparently duplicated the computation of this value in several places ([here](https://github.com/element-hq/element-x-android/blob/010a90f9ffb0db9411cbfc69bf8fd5f87b029e7d/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/roomlist/RoomSummaryDetailsFactory.kt#L50), [here](https://github.com/element-hq/element-x-android/blob/010a90f9ffb0db9411cbfc69bf8fd5f87b029e7d/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/room/MatrixRoom.kt#L60), [here](https://github.com/element-hq/element-x-android/blob/010a90f9ffb0db9411cbfc69bf8fd5f87b029e7d/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/analytics/JoinedRoomExt.kt#L35)... and in other many places, with different outputs) so we should try to ensure consistency.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.