From 71097379ece15aae18e85085fa693d92acb8e5e7 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 d0f96335..985eaa7d 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);