@@ -19,7 +19,7 @@ Meteor.methods({
1919 unreadAlert : Match . Optional ( Boolean ) ,
2020 notificationsSoundVolume : Match . Optional ( Number ) ,
2121 desktopNotifications : Match . Optional ( String ) ,
22- mobileNotifications : Match . Optional ( String ) ,
22+ pushNotifications : Match . Optional ( String ) ,
2323 enableAutoAway : Match . Optional ( Boolean ) ,
2424 highlights : Match . Optional ( [ String ] ) ,
2525 messageViewMode : Match . Optional ( Number ) ,
@@ -46,7 +46,7 @@ Meteor.methods({
4646
4747 const {
4848 desktopNotifications : oldDesktopNotifications ,
49- mobileNotifications : oldMobileNotifications ,
49+ pushNotifications : oldMobileNotifications ,
5050 emailNotificationMode : oldEmailNotifications ,
5151 } = ( user . settings && user . settings . preferences ) || { } ;
5252
@@ -81,11 +81,11 @@ Meteor.methods({
8181 }
8282 }
8383
84- if ( settings . mobileNotifications && oldMobileNotifications !== settings . mobileNotifications ) {
85- if ( settings . mobileNotifications === 'default' ) {
84+ if ( settings . pushNotifications && oldMobileNotifications !== settings . pushNotifications ) {
85+ if ( settings . pushNotifications === 'default' ) {
8686 Subscriptions . clearNotificationUserPreferences ( user . _id , 'mobilePushNotifications' , 'mobilePrefOrigin' ) ;
8787 } else {
88- Subscriptions . updateNotificationUserPreferences ( user . _id , settings . mobileNotifications , 'mobilePushNotifications' , 'mobilePrefOrigin' ) ;
88+ Subscriptions . updateNotificationUserPreferences ( user . _id , settings . pushNotifications , 'mobilePushNotifications' , 'mobilePrefOrigin' ) ;
8989 }
9090 }
9191
0 commit comments