From 0eaf32db459200f27abb77469335a2397d565f15 Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Thu, 17 Oct 2013 15:08:11 -0400 Subject: [PATCH] Add a message to flags created because of the newuser_spam_host_threshold site setting --- app/models/user.rb | 2 +- config/locales/server.en.yml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/models/user.rb b/app/models/user.rb index 3576bebaa9c..aeab21cb254 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -456,7 +456,7 @@ class User < ActiveRecord::Base admin = Discourse.system_user topic_links.includes(:post).each do |tl| begin - PostAction.act(admin, tl.post, PostActionType.types[:spam]) + PostAction.act(admin, tl.post, PostActionType.types[:spam], message: I18n.t('flag_reason.spam_hosts')) rescue PostAction::AlreadyActed # If the user has already acted, just ignore it end diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml index 5a5a341576f..41a2ff4d785 100644 --- a/config/locales/server.en.yml +++ b/config/locales/server.en.yml @@ -1162,3 +1162,5 @@ en: flag_reason: sockpuppet: "A new user created a topic, and another new user at the same IP address replied. See the flag_sockpuppets site setting." + spam_hosts: "This user tried to create multiple posts with links to the same domain. See the newuser_spam_host_threshold site setting." +