From f1c414882cbbdb22c6bcc6315c03a1d3c8454164 Mon Sep 17 00:00:00 2001 From: Gary Kim Date: Thu, 29 Aug 2019 14:05:42 +0000 Subject: Add Ability for User to Customize Email Notification Frequency (#7813) * Add Backend Logic for Toggling Email Notification This commit adds the backend logic for allowing users to enable or disable email notifications. The implementation ensures that only issue notification emails get disabled and important emails are still sent regardless of the setting. The UI to toggle this setting has not yet been implemented. * Add UI and complete user email notification enable This commit completes the functionality to allow users to disable their own email notifications. Signed-off-by: Gary Kim * Add Third Option for Only Email on Mention Signed-off-by: Gary Kim * Readd NOT NULL to new preference string Signed-off-by: Gary Kim * Add Tests and Rewrite Comment Signed-off-by: Gary Kim * Allow admin to set default email frequency Signed-off-by: Gary Kim * Add new config option to docs Signed-off-by: Gary Kim * Fix a few mistakes Signed-off-by: Gary Kim * Only update required columns Signed-off-by: Gary Kim * Simplify an error check Signed-off-by: Gary Kim * Make email_notification_preference column in DB be VARCHAR(20) Signed-off-by: Gary Kim * Handle errors Signed-off-by: Gary Kim * Update models/migrations/v93.go Co-Authored-By: Lauris BH --- options/locale/locale_en-US.ini | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'options') diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index d6d54a2249..90ee32a25c 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -557,6 +557,11 @@ confirm_delete_account = Confirm Deletion delete_account_title = Delete User Account delete_account_desc = Are you sure you want to permanently delete this user account? +email_notifications.enable = Enable Email Notifications +email_notifications.onmention = Only Email on Mention +email_notifications.disable = Disable Email Notifications +email_notifications.submit = Set Email Preference + [repo] owner = Owner repo_name = Repository Name @@ -1126,6 +1131,10 @@ settings.basic_settings = Basic Settings settings.mirror_settings = Mirror Settings settings.sync_mirror = Synchronize Now settings.mirror_sync_in_progress = Mirror synchronization is in progress. Check back in a minute. +settings.email_notifications.enable = Enable Email Notifications +settings.email_notifications.onmention = Only Email on Mention +settings.email_notifications.disable = Disable Email Notifications +settings.email_notifications.submit = Set Email Preference settings.site = Website settings.update_settings = Update Settings settings.advanced_settings = Advanced Settings -- cgit v1.2.3