A platform for community discussion. Free, open, simple.
FIX: do not add `_pm` suffix to locale key when email is from system user (#31505)
Penar Musarajf498c3b3e81a
diff --git a/lib/email/message_builder.rb b/lib/email/message_builder.rbindex 1284ba93727..062d0757bb0 100644--- a/lib/email/message_builder.rb+++ b/lib/email/message_builder.rb@@ -47,7 +47,9 @@ module Emailelseif @opts[:only_reply_by_email]string = +"user_notifications.only_reply_by_email"- string << "_pm" if @opts[:private_reply]+ if @opts[:private_reply] && @opts[:username] != Discourse.system_user.username+ string << "_pm"+ endelsestring =(@@ -57,7 +59,9 @@ module Email+@visit_link_to_respond_keyend)- string << "_pm" if @opts[:private_reply]+ if @opts[:private_reply] && @opts[:username] != Discourse.system_user.username+ string << "_pm"+ endend@template_args[:respond_instructions] = "---\n" + I18n.t(string, @template_args)end