Also filter redacted events

This commit is contained in:
Benoit Marty 2021-03-02 11:18:06 +01:00
parent c33af6de6a
commit 95395945f2

View file

@ -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)
}
}