use isDm from the SDK to determine if a room is a direct one to one room.

This commit is contained in:
Mauro Romito
2026-05-06 12:05:44 +02:00
committed by Mauro
parent 2ce32d00ef
commit b5d9f03ad0
6 changed files with 13 additions and 1 deletions
@@ -54,6 +54,10 @@ struct RoomInfoProxy: RoomInfoProxyProtocol {
roomInfo.isSpace
}
var isDM: Bool {
roomInfo.isDm
}
var successor: SuccessorRoom? {
roomInfo.successorRoom
}
@@ -38,6 +38,7 @@ protocol RoomInfoProxyProtocol: BaseRoomInfoProxyProtocol {
var isDirect: Bool { get }
var isSpace: Bool { get }
var isFavourite: Bool { get }
var isDM: Bool { get }
var canonicalAlias: String? { get }
var alternativeAliases: [String] { get }
@@ -224,7 +224,7 @@ extension JoinedRoomProxyProtocol {
}
var isDirectOneToOneRoom: Bool {
infoPublisher.value.isDirect && infoPublisher.value.activeMembersCount <= 2
infoPublisher.value.isDM
}
func members() async -> [RoomMemberProxyProtocol]? {