From 95395945f21397bef9bba407a1b2a3f79eb0e3b2 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Tue, 2 Mar 2021 11:18:06 +0100 Subject: [PATCH] Also filter redacted events --- .../session/room/relation/FetchEditHistoryTask.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/relation/FetchEditHistoryTask.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/relation/FetchEditHistoryTask.kt index f1c8fd49a4..f9fd5f9348 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/relation/FetchEditHistoryTask.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/relation/FetchEditHistoryTask.kt @@ -49,11 +49,11 @@ internal class DefaultFetchEditHistoryTask @Inject constructor( ) } - // Filter out edition form other users + // Filter out edition form other users, and redacted editions val originalSenderId = response.originalEvent?.senderId - val events = response.chunks.filter { - it.senderId == originalSenderId - } + val events = response.chunks + .filter { it.senderId == originalSenderId } + .filter { !it.isRedacted() } return events + listOfNotNull(response.originalEvent) } }