change: stricter private timeline media visibility

This commit is contained in:
Mauro Romito
2025-04-10 14:59:02 +02:00
committed by Mauro
parent 2990b7b890
commit 88397792cf
2 changed files with 13 additions and 2 deletions
@@ -49,6 +49,17 @@ struct RoomInfoProxy: BaseRoomInfoProxyProtocol {
var isDirect: Bool { roomInfo.isDirect }
var isPublic: Bool { roomInfo.isPublic }
// A room might be non public but also not private given the fact that the join rule might be missing or unsupported.
var isPrivate: Bool {
switch roomInfo.joinRule {
case .invite, .knock, .restricted, .knockRestricted:
true
default:
false
}
}
var isSpace: Bool { roomInfo.isSpace }
var isTombstoned: Bool { roomInfo.isTombstoned }
var isFavourite: Bool { roomInfo.isFavourite }