Change e-mail notifications to only be sent when recipient is offline (#17984)
* Change e-mail notifications to only be sent when recipient is offline Change the default for follow and mention notifications back on * Add preference to always send e-mail notifications * Change wording
This commit is contained in:
parent
fd9a9b07c2
commit
8e20e16cf0
7 changed files with 58 additions and 25 deletions
|
@ -38,6 +38,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
|
||||
|
@ -132,6 +133,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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue