Added new email opt out for GabPRO reminders/introducing

• Added:
- new email opt out for GabPRO reminders/introducing
This commit is contained in:
Developer 2021-02-23 13:30:04 -05:00
parent 16b053b72d
commit 8deb255593
6 changed files with 9 additions and 2 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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?

View File

@ -133,6 +133,7 @@ en:
reblog: Send e-mail when someone reposts your status
report: Send e-mail when a new report is submitted
emails_from_gabcom: Receive e-mail from Gab.com with announcements and other information
pro_reminder: Send e-mail regarding GabPRO membership
'no': 'No'
required:
mark: "*"

View File

@ -35,6 +35,7 @@ defaults: &defaults
digest: true
report: true
emails_from_gabcom: true
pro_reminder: true
interactions:
must_be_follower: false
must_be_following: false