Skip to content

A platform for community discussion. Free, open, simple.

FEATURE: PWA users are prompted for push before first post (#17888)

Rafael dos Santos Silva5afdf24292db
diff --git a/app/assets/javascripts/discourse/app/components/notification-consent-banner.js b/app/assets/javascripts/discourse/app/components/notification-consent-banner.js
index d19abc998d9..23c7b794729 100644
--- a/app/assets/javascripts/discourse/app/components/notification-consent-banner.js
+++ b/app/assets/javascripts/discourse/app/components/notification-consent-banner.js
@@ -32,7 +32,7 @@ export default DesktopNotificationConfig.extend({
this.siteSettings.push_notifications_prompt &&
!isNotSupported &&
this.currentUser &&
- anyPosts &&
+ (this.capabilities.isPwa || anyPosts) &&
Notification.permission !== "denied" &&
Notification.permission !== "granted" &&
!isEnabled &&