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:
commit
b0bcb248a1
11 changed files with 68 additions and 19 deletions
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue