Update the SDK and enable event permalinks. (#2748)

This commit is contained in:
Doug
2024-04-26 09:59:01 +01:00
committed by GitHub
parent 008088ab06
commit df6cf25524
17 changed files with 71 additions and 63 deletions
@@ -160,14 +160,13 @@ class RoomProxy: RoomProxyProtocol {
}
func timelineFocusedOnEvent(eventID: String, numberOfEvents: UInt16) async -> Result<TimelineProxyProtocol, RoomProxyError> {
.failure(.sdkError(RoomProxyMockError.generic))
// do {
// let timeline = try await room.timelineFocusedOnEvent(eventId: eventID, numContextEvents: numberOfEvents, internalIdPrefix: UUID().uuidString)
// return .success(TimelineProxy(timeline: timeline, isLive: false))
// } catch {
// MXLog.error("Failed to create a timeline focussed on: \(eventID) with error: \(error)")
// return .failure(.sdkError(error))
// }
do {
let timeline = try await room.timelineFocusedOnEvent(eventId: eventID, numContextEvents: numberOfEvents, internalIdPrefix: UUID().uuidString)
return .success(TimelineProxy(timeline: timeline, isLive: false))
} catch {
MXLog.error("Failed to create a timeline focussed on: \(eventID) with error: \(error)")
return .failure(.sdkError(error))
}
}
func redact(_ eventID: String) async -> Result<Void, RoomProxyError> {