mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 01:20:12 +00:00
Redact and event ID, not an item ID.
This commit is contained in:
@@ -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 }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user