Move the pinned timeline in line with the other timeline creation methods and have it report errors just like the others

This commit is contained in:
Stefan Ceriu
2025-05-21 22:16:03 +03:00
committed by Stefan Ceriu
parent 909aa086f2
commit 250a7ed451
13 changed files with 180 additions and 121 deletions
@@ -16,6 +16,7 @@ enum RoomProxyError: Error {
case invalidMedia
case eventNotFound
case missingTransactionID
case failedCreatingPinnedTimeline
}
/// An enum that describes the relationship between the current user and the room, and contains a reference to the specific implementation of the `RoomProxy`.
@@ -75,8 +76,6 @@ protocol JoinedRoomProxyProtocol: RoomProxyProtocol {
var timeline: TimelineProxyProtocol { get }
var pinnedEventsTimeline: TimelineProxyProtocol? { get async }
func subscribeForUpdates() async
func subscribeToRoomInfoUpdates()
@@ -89,6 +88,8 @@ protocol JoinedRoomProxyProtocol: RoomProxyProtocol {
allowedMessageTypes: [TimelineAllowedMessageType],
presentation: TimelineKind.MediaPresentation) async -> Result<TimelineProxyProtocol, RoomProxyError>
func pinnedEventsTimeline() async -> Result<TimelineProxyProtocol, RoomProxyError>
func enableEncryption() async -> Result<Void, RoomProxyError>
func redact(_ eventID: String) async -> Result<Void, RoomProxyError>