mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 21:32:34 +00:00
Drop the comments from the redaction resolution
Review feedback: the filtered-out result and the test name already state why an unmappable redaction must not notify.
This commit is contained in:
-4
@@ -284,10 +284,6 @@ class DefaultNotifiableEventResolver(
|
||||
// Note: this case will be handled below
|
||||
val redactedEventId = content.redactedEventId
|
||||
if (redactedEventId == null) {
|
||||
// Treat it as filtered out rather than as an error: an unknown error is turned
|
||||
// into a visible "you have N notifications" fallback plus a battery banner, so a
|
||||
// redaction we cannot map would notify about a message that was just deleted.
|
||||
// See https://github.com/element-hq/element-x-android/issues/5766
|
||||
Timber.tag(loggerTag.value).w("Ignoring redaction notification with no redactedEventId.")
|
||||
throw NotificationResolverException.EventFilteredOut
|
||||
} else {
|
||||
|
||||
-2
@@ -834,8 +834,6 @@ class DefaultNotifiableEventResolverTest : RobolectricTest() {
|
||||
val request = aPushRequest(A_SESSION_ID, A_ROOM_ID, AN_EVENT_ID, "firebase")
|
||||
val result = sut.resolveEvents(A_SESSION_ID, listOf(request))
|
||||
assertThat(result.getEvent(request)?.getOrNull()).isNull()
|
||||
// Must be EventFilteredOut and not an error: the result processor renders a fallback
|
||||
// notification for any other exception, which is the bug in #5766.
|
||||
assertThat(result.getEvent(request)?.exceptionOrNull()).isEqualTo(NotificationResolverException.EventFilteredOut)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user