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:
+12
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user