Merge pull request #6241 from element-hq/feature/bma/fixRedactedNotification

Ensure that redacted event from encrypted room does not trigger a fallback notification
This commit is contained in:
Benoit Marty 2026-03-03 11:43:45 +01:00 committed by GitHub
commit b0bcb248a1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 68 additions and 19 deletions

View file

@ -124,6 +124,14 @@ class DefaultPushHandler(
sessionId = request.sessionId,
comment = "Push handled successfully but notification was filtered out",
)
} else if (exception is NotificationResolverException.EventRedacted) {
pushHistoryService.onSuccess(
providerInfo = request.providerInfo,
eventId = request.eventId,
roomId = request.roomId,
sessionId = request.sessionId,
comment = "Push handled successfully but event has been redacted",
)
} else {
val reason = when (exception) {
is NotificationResolverException.EventNotFound -> "Event not found"
@ -155,6 +163,10 @@ class DefaultPushHandler(
// Do nothing, we don't want to show a notification for filtered out events
null
}
is NotificationResolverException.EventRedacted -> {
// Do nothing, we don't want to show a notification for redacted events
null
}
else -> {
Timber.tag(loggerTag.value).e(exception, "Failed to resolve push event")
ResolvedPushEvent.Event(