mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-05 20:09:04 +00:00
Fix editing items not in the timeline failing (#3075)
This commit is contained in:
@@ -336,6 +336,16 @@ class RoomProxy: RoomProxyProtocol {
|
||||
}
|
||||
}
|
||||
|
||||
func edit(eventID: String, newContent: RoomMessageEventContentWithoutRelation) async -> Result<Void, RoomProxyError> {
|
||||
do {
|
||||
try await room.edit(eventId: eventID, newContent: newContent)
|
||||
return .success(())
|
||||
} catch {
|
||||
MXLog.error("Failed editing event id \(eventID), in room \(id) with error: \(error)")
|
||||
return .failure(.sdkError(error))
|
||||
}
|
||||
}
|
||||
|
||||
func sendTypingNotification(isTyping: Bool) async -> Result<Void, RoomProxyError> {
|
||||
MXLog.info("Sending typing notification isTyping: \(isTyping)")
|
||||
|
||||
|
||||
@@ -96,6 +96,8 @@ protocol RoomProxyProtocol {
|
||||
|
||||
func markAsRead(receiptType: ReceiptType) async -> Result<Void, RoomProxyError>
|
||||
|
||||
func edit(eventID: String, newContent: RoomMessageEventContentWithoutRelation) async -> Result<Void, RoomProxyError>
|
||||
|
||||
/// https://spec.matrix.org/v1.9/client-server-api/#typing-notifications
|
||||
@discardableResult func sendTypingNotification(isTyping: Bool) async -> Result<Void, RoomProxyError>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user