removed identifier in the UIAction for opening a URL, also added a function to get a thread root from any event

This commit is contained in:
Mauro Romito
2025-09-30 18:07:18 +02:00
committed by Mauro
parent 94c42c81cc
commit 204b7c8297
4 changed files with 82 additions and 1 deletions
@@ -190,6 +190,16 @@ class JoinedRoomProxy: JoinedRoomProxyProtocol {
}
}
func getThreadRootEventID(for eventID: String) async -> Result<String?, RoomProxyError> {
do {
let event = try await room.loadOrFetchEvent(eventId: eventID)
return .success(event.threadRootEventId())
} catch {
MXLog.error("Failed fetching the event with id: \(eventID) with error: \(error)")
return .failure(.sdkError(error))
}
}
func messageFilteredTimeline(focus: TimelineFocus,
allowedMessageTypes: [TimelineAllowedMessageType],
presentation: TimelineKind.MediaPresentation) async -> Result<any TimelineProxyProtocol, RoomProxyError> {
@@ -97,6 +97,8 @@ protocol JoinedRoomProxyProtocol: RoomProxyProtocol {
func threadTimeline(eventID: String) async -> Result<TimelineProxyProtocol, RoomProxyError>
func getThreadRootEventID(for eventID: String) async -> Result<String?, RoomProxyError>
func messageFilteredTimeline(focus: TimelineFocus,
allowedMessageTypes: [TimelineAllowedMessageType],
presentation: TimelineKind.MediaPresentation) async -> Result<TimelineProxyProtocol, RoomProxyError>