Do not use m.room.aliases event to compute a room name (#2428)

This commit is contained in:
Benoit Marty 2020-11-20 14:29:48 +01:00 committed by Benoit Marty
parent 4d9b9cb959
commit 03715e0939

View file

@ -71,12 +71,6 @@ internal class RoomDisplayNameResolver @Inject constructor(
return name return name
} }
val aliases = CurrentStateEventEntity.getOrNull(realm, roomId, type = EventType.STATE_ROOM_ALIASES, stateKey = "")?.root
name = ContentMapper.map(aliases?.content).toModel<RoomAliasesContent>()?.aliases?.firstOrNull()
if (!name.isNullOrEmpty()) {
return name
}
val roomMembers = RoomMemberHelper(realm, roomId) val roomMembers = RoomMemberHelper(realm, roomId)
val activeMembers = roomMembers.queryActiveRoomMembersEvent().findAll() val activeMembers = roomMembers.queryActiveRoomMembersEvent().findAll()