From 6be536ca50c0ca00b86630aa422922f397e78792 Mon Sep 17 00:00:00 2001 From: Arpit Jalan Date: Wed, 31 Jan 2018 11:46:25 +0530 Subject: [PATCH] rename 'max_private_messages_per_day' to 'max_personal_messages_per_day' --- app/models/topic.rb | 2 +- config/locales/server.en.yml | 2 +- config/site_settings.yml | 2 +- db/migrate/20180131052859_rename_private_personal.rb | 2 ++ 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/models/topic.rb b/app/models/topic.rb index 3561ffbc5b0..3bc8d72b4ac 100644 --- a/app/models/topic.rb +++ b/app/models/topic.rb @@ -310,7 +310,7 @@ class Topic < ActiveRecord::Base def limit_private_messages_per_day return unless private_message? - apply_per_day_rate_limit_for("pms", :max_private_messages_per_day) + apply_per_day_rate_limit_for("pms", :max_personal_messages_per_day) end def self.fancy_title(title) diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml index c253fa3e60a..abc6465bd69 100644 --- a/config/locales/server.en.yml +++ b/config/locales/server.en.yml @@ -1203,7 +1203,7 @@ en: max_bookmarks_per_day: "Maximum number of bookmarks per user per day." max_edits_per_day: "Maximum number of edits per user per day." max_topics_per_day: "Maximum number of topics a user can create per day." - max_private_messages_per_day: "Maximum number of messages users can create per day." + max_personal_messages_per_day: "Maximum number of messages users can create per day." max_invites_per_day: "Maximum number of invites a user can send per day." max_topic_invitations_per_day: "Maximum number of topic invitations a user can send per day." diff --git a/config/site_settings.yml b/config/site_settings.yml index d7ca4eeb684..d126cf303e9 100644 --- a/config/site_settings.yml +++ b/config/site_settings.yml @@ -1041,7 +1041,7 @@ rate_limits: rate_limit_new_user_create_topic: 120 rate_limit_new_user_create_post: 30 max_topics_per_day: 20 - max_private_messages_per_day: 20 + max_personal_messages_per_day: 20 max_likes_per_day: 50 max_bookmarks_per_day: 20 max_flags_per_day: 20 diff --git a/db/migrate/20180131052859_rename_private_personal.rb b/db/migrate/20180131052859_rename_private_personal.rb index 80a17d549af..56f75d8510f 100644 --- a/db/migrate/20180131052859_rename_private_personal.rb +++ b/db/migrate/20180131052859_rename_private_personal.rb @@ -10,6 +10,7 @@ class RenamePrivatePersonal < ActiveRecord::Migration[5.1] 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 + setting :max_private_messages_per_day, :max_personal_messages_per_day end def down @@ -18,5 +19,6 @@ class RenamePrivatePersonal < ActiveRecord::Migration[5.1] 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 + setting :max_private_messages_per_day, :max_personal_messages_per_day end end