diff --git a/lib/controllers/unified_push.dart b/lib/controllers/unified_push.dart index 6b1538d..c4d923c 100644 --- a/lib/controllers/unified_push.dart +++ b/lib/controllers/unified_push.dart @@ -63,10 +63,14 @@ class UnifiedPushController extends AsyncNotifier { "Failed to decrypt notification. Try toggling off and on UnifiedPush in settings.", ); } - final (event, roomMetadata) = await ref + final pushResponse = await ref .read(ClientController.provider.notifier) .handlePush(json.decode(String.fromCharCodes(message.content))); + if (pushResponse == null) return; + + final (event, roomMetadata) = pushResponse; + if (event.unreadType?.shouldNotify() != true || (!isInBackground && await windowManager.isFocused().onError((_, _) => true) &&