about summary refs log tree commit diff
path: root/app/lib/user_settings_decorator.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/lib/user_settings_decorator.rb')
-rw-r--r--app/lib/user_settings_decorator.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/lib/user_settings_decorator.rb b/app/lib/user_settings_decorator.rb
index b87635dbc..22601ecaa 100644
--- a/app/lib/user_settings_decorator.rb
+++ b/app/lib/user_settings_decorator.rb
@@ -66,6 +66,7 @@ class UserSettingsDecorator
     user.settings['home_reblogs']        = home_reblogs_preference if change?('setting_home_reblogs')
     user.settings['max_history_public']  = max_history_public_preference if change?('setting_max_history_public')
     user.settings['max_history_private'] = max_history_private_preference if change?('setting_max_history_private')
+    user.settings['web_push']            = web_push_preferences if change?('setting_web_push')
   end
 
   def merged_notification_emails
@@ -256,6 +257,10 @@ class UserSettingsDecorator
     settings['setting_max_history_private'].to_i
   end
 
+  def web_push_preferences
+    boolean_cast_setting 'setting_web_push'
+  end
+
   def boolean_cast_setting(key)
     ActiveModel::Type::Boolean.new.cast(settings[key])
   end