From 5ed582551ad2eb0bad27d870cec406cd4886cbf5 Mon Sep 17 00:00:00 2001 From: Gerhard Schlager Date: Mon, 20 Aug 2018 15:08:12 +0200 Subject: [PATCH] FIX: SpamRulesEnforcer should use default locale --- app/services/spam_rules_enforcer.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/services/spam_rules_enforcer.rb b/app/services/spam_rules_enforcer.rb index ecfc2a1f6e0..7a5133c1a67 100644 --- a/app/services/spam_rules_enforcer.rb +++ b/app/services/spam_rules_enforcer.rb @@ -12,8 +12,10 @@ class SpamRulesEnforcer end def enforce! - SpamRule::AutoSilence.new(@user).perform if @user - SpamRule::FlagSockpuppets.new(@post).perform if @post + I18n.with_locale(SiteSetting.default_locale) do + SpamRule::AutoSilence.new(@user).perform if @user + SpamRule::FlagSockpuppets.new(@post).perform if @post + end true end