Added new email opt out for GabPRO reminders/introducing
• Added: - new email opt out for GabPRO reminders/introducing
This commit is contained in:
@@ -25,7 +25,7 @@ class Settings::NotificationsController < Settings::BaseController
|
||||
|
||||
def user_settings_params
|
||||
params.require(:user).permit(
|
||||
notification_emails: %i(follow follow_request reblog favourite mention digest report emails_from_gabcom),
|
||||
notification_emails: %i(follow follow_request reblog favourite mention digest report pro_reminder emails_from_gabcom),
|
||||
interactions: %i(must_be_follower must_be_following must_be_following_dm)
|
||||
)
|
||||
end
|
||||
|
||||
@@ -47,7 +47,7 @@ class Settings::PreferencesController < Settings::BaseController
|
||||
:setting_hide_network,
|
||||
:setting_aggregate_reblogs,
|
||||
:setting_group_in_home_feed,
|
||||
notification_emails: %i(follow follow_request reblog favourite mention digest report emails_from_gabcom),
|
||||
notification_emails: %i(follow follow_request reblog favourite mention digest report pro_reminder emails_from_gabcom),
|
||||
interactions: %i(must_be_follower must_be_following)
|
||||
)
|
||||
end
|
||||
|
||||
@@ -201,6 +201,10 @@ class User < ApplicationRecord
|
||||
settings.notification_emails['report']
|
||||
end
|
||||
|
||||
def allows_pro_reminder_emails?
|
||||
settings.notification_emails['pro_reminder']
|
||||
end
|
||||
|
||||
def hides_network?
|
||||
@hides_network ||= settings.hide_network
|
||||
end
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
= ff.input :reblog, as: :boolean, wrapper: :with_label
|
||||
= ff.input :favourite, as: :boolean, wrapper: :with_label
|
||||
= ff.input :mention, as: :boolean, wrapper: :with_label
|
||||
= ff.input :pro_reminder, as: :boolean, wrapper: :with_label
|
||||
= ff.input :emails_from_gabcom, as: :boolean, wrapper: :with_label
|
||||
|
||||
- if current_user.staff?
|
||||
|
||||
Reference in New Issue
Block a user