diff --git a/app/assets/javascripts/discourse/initializers/subscribe-user-notifications.js.es6 b/app/assets/javascripts/discourse/initializers/subscribe-user-notifications.js.es6 index 92ab828c680..79157a123a6 100644 --- a/app/assets/javascripts/discourse/initializers/subscribe-user-notifications.js.es6 +++ b/app/assets/javascripts/discourse/initializers/subscribe-user-notifications.js.es6 @@ -29,10 +29,6 @@ export default { }); } - bus.subscribe("/notification-alert/" + user.get('id'), function(data){ - onNotification(data, user); - }); - bus.subscribe("/notification/" + user.get('id'), function(data) { const oldUnread = user.get('unread_notifications'); const oldPM = user.get('unread_private_messages'); @@ -85,7 +81,13 @@ export default { }); if (!Ember.testing) { - initDesktopNotifications(bus); + if (!Discourse.Mobile.mobileView) { + bus.subscribe("/notification-alert/" + user.get('id'), function(data){ + onNotification(data, user); + }); + + initDesktopNotifications(bus); + } } } }