mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-12-26 17:43:11 +01:00
Exclude yourself when decorating rooms which are direct or don't have more than 2 users.
This commit is contained in:
parent
0753ba3495
commit
a2a2015af6
@ -9,6 +9,7 @@ Improvements 🙌:
|
||||
|
||||
Bugfix 🐛:
|
||||
- Fix issue when updating the avatar of a room
|
||||
- Exclude yourself when decorating rooms which are direct or don't have more than 2 users (#2370)
|
||||
|
||||
Translations 🗣:
|
||||
-
|
||||
|
@ -241,9 +241,9 @@ internal class UpdateTrustWorker(context: Context,
|
||||
private fun computeRoomShield(activeMemberUserIds: List<String>, roomSummaryEntity: RoomSummaryEntity): RoomEncryptionTrustLevel {
|
||||
Timber.d("## CrossSigning - computeRoomShield ${roomSummaryEntity.roomId} -> $activeMemberUserIds")
|
||||
// The set of “all users” depends on the type of room:
|
||||
// For regular / topic rooms, all users including yourself, are considered when decorating a room
|
||||
// For regular / topic rooms which have more than 2 members (including yourself) are considered when decorating a room
|
||||
// For 1:1 and group DM rooms, all other users (i.e. excluding yourself) are considered when decorating a room
|
||||
val listToCheck = if (roomSummaryEntity.isDirect) {
|
||||
val listToCheck = if (roomSummaryEntity.isDirect || activeMemberUserIds.size <= 2) {
|
||||
activeMemberUserIds.filter { it != myUserId }
|
||||
} else {
|
||||
activeMemberUserIds
|
||||
|
Loading…
Reference in New Issue
Block a user