Co-authored-by: Doug <douglase@element.io>
This commit is contained in:
Mauro
2024-05-20 14:37:45 +02:00
committed by GitHub
parent 3b82ce8def
commit 545b5c31cc
15 changed files with 192 additions and 95 deletions
@@ -441,9 +441,9 @@ class ClientProxy: ClientProxyProtocol {
room: room)
}
func roomPreviewForIdentifier(_ identifier: String) async -> Result<RoomPreviewDetails, ClientProxyError> {
func roomPreviewForIdentifier(_ identifier: String, via: [String]) async -> Result<RoomPreviewDetails, ClientProxyError> {
do {
let roomPreview = try await client.getRoomPreview(roomIdOrAlias: identifier)
let roomPreview = try await client.getRoomPreviewFromRoomId(roomId: identifier, viaServers: via)
return .success(.init(roomPreview))
} catch {
MXLog.error("Failed retrieving preview for room: \(identifier) with error: \(error)")