diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-04-08 22:24:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-08 22:24:07 +0200 |
commit | c483101b4ae7d9f22ea43921c512f479e16e98ca (patch) | |
tree | 1de88394686dd7f532e7ddf68a9023caa1bfdb88 /app/lib | |
parent | e0c39f9fad837b77373220515f078f2443ddf553 (diff) | |
parent | a8d89aabb2292af499f2d1392ad435dd261dd41b (diff) |
Merge pull request #1737 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/lib')
-rw-r--r-- | app/lib/user_settings_decorator.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/lib/user_settings_decorator.rb b/app/lib/user_settings_decorator.rb index d8015e50d..d339e078c 100644 --- a/app/lib/user_settings_decorator.rb +++ b/app/lib/user_settings_decorator.rb @@ -43,6 +43,7 @@ class UserSettingsDecorator user.settings['use_pending_items'] = use_pending_items_preference if change?('setting_use_pending_items') user.settings['trends'] = trends_preference if change?('setting_trends') user.settings['crop_images'] = crop_images_preference if change?('setting_crop_images') + user.settings['always_send_emails'] = always_send_emails_preference if change?('setting_always_send_emails') end def merged_notification_emails @@ -157,6 +158,10 @@ class UserSettingsDecorator boolean_cast_setting 'setting_crop_images' end + def always_send_emails_preference + boolean_cast_setting 'setting_always_send_emails' + end + def boolean_cast_setting(key) ActiveModel::Type::Boolean.new.cast(settings[key]) end |