Fix various new SDK breaking changes.

This commit is contained in:
Stefan Ceriu
2025-07-22 18:09:27 +03:00
committed by Stefan Ceriu
parent 23607dd553
commit 3726bcd012
9 changed files with 26 additions and 26 deletions

View File

@@ -572,7 +572,7 @@ class ClientProxy: ClientProxyProtocol {
func roomPreviewForIdentifier(_ identifier: String, via: [String]) async -> Result<RoomPreviewProxyProtocol, ClientProxyError> {
do {
let roomPreview = try await client.getRoomPreviewFromRoomId(roomId: identifier, viaServers: via)
return try .success(RoomPreviewProxy(roomPreview: roomPreview))
return .success(RoomPreviewProxy(roomPreview: roomPreview))
} catch ClientError.MatrixApi(.forbidden, _, _, _) {
MXLog.error("Failed retrieving preview for room: \(identifier) is private")
return .failure(.roomPreviewIsPrivate)
@@ -590,7 +590,7 @@ class ClientProxy: ClientProxyProtocol {
staticRoomSummaryProvider.roomListPublisher.value.first { $0.canonicalAlias == alias || $0.alternativeAliases.contains(alias) }
}
func reportRoomForIdentifier(_ identifier: String, reason: String?) async -> Result<Void, ClientProxyError> {
func reportRoomForIdentifier(_ identifier: String, reason: String) async -> Result<Void, ClientProxyError> {
do {
guard let room = try client.getRoom(roomId: identifier) else {
MXLog.error("Failed reporting room with identifier: \(identifier), room not in local store")
@@ -1231,6 +1231,8 @@ private extension MediaPreviewConfig {
.privateOnly
case .off:
.never
case .none:
.always
}
}
@@ -1240,6 +1242,8 @@ private extension MediaPreviewConfig {
true
case .on:
false
case .none:
true
}
}
}