Handle EventRedacted case. Fixes #5569

This commit is contained in:
Benoit Marty 2026-02-24 12:38:20 +01:00
parent 1c5f185d6a
commit 43319f6e90
3 changed files with 21 additions and 0 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(