Browse Source

fix: handle Notification requireInteraction option (#36477)

Jeremy Spiegel 2 years ago
parent
commit
665cf03f74
1 changed files with 3 additions and 0 deletions
  1. 3 0
      shell/browser/notifications/platform_notification_service.cc

+ 3 - 0
shell/browser/notifications/platform_notification_service.cc

@@ -35,6 +35,9 @@ void OnWebNotificationAllowed(base::WeakPtr<Notification> notification,
     options.icon = icon;
     options.silent = audio_muted ? true : data.silent;
     options.has_reply = false;
+    if (data.require_interaction)
+      options.timeout_type = u"never";
+
     notification->Show(options);
   } else {
     notification->Destroy();