diff --git a/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/notifications/DefaultNotifiableEventResolver.kt b/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/notifications/DefaultNotifiableEventResolver.kt index 4ba822aa25..ff3e09ed05 100644 --- a/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/notifications/DefaultNotifiableEventResolver.kt +++ b/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/notifications/DefaultNotifiableEventResolver.kt @@ -304,8 +304,8 @@ class DefaultNotifiableEventResolver( // Note: this case will be handled below val redactedEventId = content.redactedEventId if (redactedEventId == null) { - Timber.tag(loggerTag.value).d("redactedEventId is null.") - throw NotificationResolverException.UnknownError("redactedEventId is null") + Timber.tag(loggerTag.value).w("Ignoring redaction notification with no redactedEventId.") + throw NotificationResolverException.EventFilteredOut } else { ResolvedPushEvent.Redaction( sessionId = userId, diff --git a/libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/notifications/DefaultNotifiableEventResolverTest.kt b/libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/notifications/DefaultNotifiableEventResolverTest.kt index 6acce3405c..4617c190a5 100644 --- a/libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/notifications/DefaultNotifiableEventResolverTest.kt +++ b/libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/notifications/DefaultNotifiableEventResolverTest.kt @@ -822,7 +822,7 @@ class DefaultNotifiableEventResolverTest : RobolectricTest() { } @Test - fun `resolve RoomRedaction with null redactedEventId should return null`() = runTest { + fun `resolve RoomRedaction with null redactedEventId is filtered out`() = runTest { val sut = createDefaultNotifiableEventResolver( notificationResult = Result.success( mapOf( @@ -838,6 +838,7 @@ 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() + assertThat(result.getEvent(request)?.exceptionOrNull()).isEqualTo(NotificationResolverException.EventFilteredOut) } @Test