Filter out some actions for failed local echoes (#1184)

* done

* pr suggestion
This commit is contained in:
Mauro
2023-06-27 18:41:18 +02:00
committed by GitHub
parent 13f5ec8a73
commit f54eb78503
9 changed files with 80 additions and 23 deletions
@@ -64,6 +64,8 @@ class MockRoomTimelineController: RoomTimelineControllerProtocol {
func editMessage(_ newMessage: String, original itemID: String) async { }
func redact(_ itemID: String) async { }
func cancelSend(_ transactionID: String) async { }
func debugInfo(for itemID: String) -> TimelineItemDebugInfo {
.init(model: "Mock debug description", originalJSON: nil, latestEditJSON: nil)
@@ -185,6 +185,11 @@ class RoomTimelineController: RoomTimelineControllerProtocol {
MXLog.error("Failed redacting message with error: \(error)")
}
}
func cancelSend(_ transactionID: String) async {
MXLog.info("Cancelling send in \(roomID)")
await roomProxy.cancelSend(transactionID: transactionID)
}
// Handle this parallel to the timeline items so we're not forced
// to bundle the Rust side objects within them
@@ -57,6 +57,8 @@ protocol RoomTimelineControllerProtocol {
func toggleReaction(_ reaction: String, to itemID: String) async
func redact(_ itemID: String) async
func cancelSend(_ transactionID: String) async
func debugInfo(for itemID: String) -> TimelineItemDebugInfo