From 7cda3a37af3a9a0b9c1f2fc3771f629fd5a7e618 Mon Sep 17 00:00:00 2001 From: Arpit Jalan Date: Wed, 31 Jan 2018 11:37:10 +0530 Subject: [PATCH] rename 'private_email_time_window_seconds' to 'personal_email_time_window_seconds' --- app/services/notification_emailer.rb | 2 +- config/locales/server.en.yml | 2 +- config/site_settings.yml | 2 +- db/migrate/20180131052859_rename_private_personal.rb | 2 ++ spec/services/notification_emailer_spec.rb | 6 +++--- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/app/services/notification_emailer.rb b/app/services/notification_emailer.rb index 4a6b56f2a2e..099b2030b4a 100644 --- a/app/services/notification_emailer.rb +++ b/app/services/notification_emailer.rb @@ -99,7 +99,7 @@ class NotificationEmailer end def private_delay - SiteSetting.private_email_time_window_seconds + SiteSetting.personal_email_time_window_seconds end def post_type diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml index 37a69c9951e..c253fa3e60a 100644 --- a/config/locales/server.en.yml +++ b/config/locales/server.en.yml @@ -1302,7 +1302,7 @@ en: create_thumbnails: "Create thumbnails and lightbox images that are too large to fit in a post." email_time_window_mins: "Wait (n) minutes before sending any notification emails, to give users a chance to edit and finalize their posts." - private_email_time_window_seconds: "Wait (n) seconds before sending any private notification emails, to give users a chance to edit and finalize their messages." + personal_email_time_window_seconds: "Wait (n) seconds before sending any private notification emails, to give users a chance to edit and finalize their messages." email_posts_context: "How many prior replies to include as context in notification emails." flush_timings_secs: "How frequently we flush timing data to the server, in seconds." title_max_word_length: "The maximum allowed word length, in characters, in a topic title." diff --git a/config/site_settings.yml b/config/site_settings.yml index 20a5cd54266..d7ca4eeb684 100644 --- a/config/site_settings.yml +++ b/config/site_settings.yml @@ -660,7 +660,7 @@ email: email_time_window_mins: default: 10 client: true - private_email_time_window_seconds: 20 + personal_email_time_window_seconds: 20 email_posts_context: 5 digest_min_excerpt_length: default: 100 diff --git a/db/migrate/20180131052859_rename_private_personal.rb b/db/migrate/20180131052859_rename_private_personal.rb index c97ade8ffe3..80a17d549af 100644 --- a/db/migrate/20180131052859_rename_private_personal.rb +++ b/db/migrate/20180131052859_rename_private_personal.rb @@ -9,6 +9,7 @@ class RenamePrivatePersonal < ActiveRecord::Migration[5.1] setting :min_private_message_title_length, :min_personal_message_title_length setting :enable_private_messages, :enable_personal_messages setting :enable_private_email_messages, :enable_personal_email_messages + setting :private_email_time_window_seconds, :personal_email_time_window_seconds end def down @@ -16,5 +17,6 @@ class RenamePrivatePersonal < ActiveRecord::Migration[5.1] setting :min_private_message_title_length, :min_personal_message_title_length setting :enable_private_messages, :enable_personal_messages setting :enable_private_email_messages, :enable_personal_email_messages + setting :private_email_time_window_seconds, :personal_email_time_window_seconds end end diff --git a/spec/services/notification_emailer_spec.rb b/spec/services/notification_emailer_spec.rb index 2d8642826b3..a3d60f441ed 100644 --- a/spec/services/notification_emailer_spec.rb +++ b/spec/services/notification_emailer_spec.rb @@ -144,7 +144,7 @@ describe NotificationEmailer do context 'user_private_message' do let(:type) { :user_private_message } - let(:delay) { SiteSetting.private_email_time_window_seconds } + let(:delay) { SiteSetting.personal_email_time_window_seconds } let!(:notification) { create_notification(:private_message) } include_examples "enqueue_private" @@ -159,7 +159,7 @@ describe NotificationEmailer do context 'user_invited_to_private_message' do let(:type) { :user_invited_to_private_message } - let(:delay) { SiteSetting.private_email_time_window_seconds } + let(:delay) { SiteSetting.personal_email_time_window_seconds } let!(:notification) { create_notification(:invited_to_private_message) } include_examples "enqueue_public" @@ -167,7 +167,7 @@ describe NotificationEmailer do context 'user_invited_to_topic' do let(:type) { :user_invited_to_topic } - let(:delay) { SiteSetting.private_email_time_window_seconds } + let(:delay) { SiteSetting.personal_email_time_window_seconds } let!(:notification) { create_notification(:invited_to_topic) } include_examples "enqueue_public"