mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 10:33:45 +00:00
Pin/Unpin Logic (#3084)
This commit is contained in:
@@ -202,6 +202,24 @@ final class TimelineProxy: TimelineProxyProtocol {
|
||||
}
|
||||
}
|
||||
|
||||
func pin(eventID: String) async -> Result<Bool, TimelineProxyError> {
|
||||
do {
|
||||
return try await .success(timeline.pinEvent(eventId: eventID))
|
||||
} catch {
|
||||
MXLog.error("Failed to pin the event \(eventID) with error: \(error)")
|
||||
return .failure(.sdkError(error))
|
||||
}
|
||||
}
|
||||
|
||||
func unpin(eventID: String) async -> Result<Bool, TimelineProxyError> {
|
||||
do {
|
||||
return try await .success(timeline.unpinEvent(eventId: eventID))
|
||||
} catch {
|
||||
MXLog.error("Failed to unpin the event \(eventID) with error: \(error)")
|
||||
return .failure(.sdkError(error))
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Sending
|
||||
|
||||
func sendAudio(url: URL,
|
||||
|
||||
Reference in New Issue
Block a user