Redact and event ID, not an item ID.

This commit is contained in:
Doug
2022-09-14 12:19:24 +01:00
committed by Doug
parent f19240d2f6
commit 91795a0d19
9 changed files with 14 additions and 14 deletions
@@ -58,7 +58,7 @@ struct MockRoomProxy: RoomProxyProtocol {
.failure(.failedSendingMessage)
}
func redactItem(_ itemId: String) async -> Result<Void, RoomProxyError> {
func redact(_ eventID: String) async -> Result<Void, RoomProxyError> {
.failure(.failedRedactingEvent)
}
}
@@ -194,14 +194,14 @@ class RoomProxy: RoomProxyProtocol {
.value
}
func redactItem(_ itemId: String) async -> Result<Void, RoomProxyError> {
func redactItem(_ eventID: String) async -> Result<Void, RoomProxyError> {
#warning("Redactions to be enabled on next SDK release.")
return .failure(.failedRedactingEvent)
// let transactionID = genTransactionId()
//
// return await Task {
// do {
// try room.redact(eventId: itemId, reason: nil, txnId: transactionID)
// try room.redact(eventId: eventID, reason: nil, txnId: transactionID)
// return .success(())
// } catch {
// return .failure(.failedRedactingEvent)
@@ -57,7 +57,7 @@ protocol RoomProxyProtocol {
func sendMessage(_ message: String) async -> Result<Void, RoomProxyError>
func redactItem(_ itemId: String) async -> Result<Void, RoomProxyError>
func redact(_ eventID: String) async -> Result<Void, RoomProxyError>
var callbacks: PassthroughSubject<RoomProxyCallback, Never> { get }
}