diff --git a/brightray/browser/win/windows_toast_notification.cc b/brightray/browser/win/windows_toast_notification.cc index 74cd74eceb..a744c88815 100644 --- a/brightray/browser/win/windows_toast_notification.cc +++ b/brightray/browser/win/windows_toast_notification.cc @@ -89,7 +89,16 @@ void WindowsToastNotification::Show( const bool silent) { auto presenter_win = static_cast(presenter()); std::wstring icon_path = presenter_win->SaveIconToFilesystem(icon, icon_url); - + + // Ask Windows for the current notification settings + // If not allowed, we return here (0 = enabled) + ABI::Windows::UI::Notifications::NotificationSetting setting; + toast_notifier_->get_Setting(&setting); + if (setting != 0) { + NotificationFailed(); + return; + } + ComPtr toast_xml; if(FAILED(GetToastXml(toast_manager_.Get(), title, msg, icon_path, silent, &toast_xml))) { NotificationFailed();