From 8e55227afc80ca1a42d453d0ec13ed472975a34d Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Thu, 25 Aug 2022 18:35:54 +0200 Subject: [PATCH] fix: Do not display push events for unknown event types --- lib/utils/push_helper.dart | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/utils/push_helper.dart b/lib/utils/push_helper.dart index d0f963352..985eaa7d7 100644 --- a/lib/utils/push_helper.dart +++ b/lib/utils/push_helper.dart @@ -112,6 +112,12 @@ Future _tryPushHelper( } Logs().v('Push helper got notification event.'); + if (!event.isEventTypeKnown) { + Logs() + .v('Push message event is from an unknown event type. Do not display.'); + return; + } + l10n ??= await L10n.delegate.load(window.locale); final matrixLocals = MatrixLocals(l10n);