Pin/Unpin Logic (#3084)

This commit is contained in:
Mauro
2024-07-26 20:41:00 +02:00
committed by GitHub
parent 5a4d21ab7a
commit 0da2d4917b
24 changed files with 659 additions and 69 deletions
@@ -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,