mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 09:11:17 +08:00
FIX: do not add _pm
suffix to locale key when email is from system user (#31505)
See https://meta.discourse.org/t/email-footer-says-visit-message-to-respond-to-no-names-after-to/354359 There may be a deeper root issue somewhere further up the stack, but this change ensures we always use the `visit_link_to_respond` locale key when the PM is from `system`. Seems cleaner than copy that says `to respond to system`. Before  After 
This commit is contained in:
@ -47,7 +47,9 @@ module Email
|
||||
else
|
||||
if @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"
|
||||
end
|
||||
else
|
||||
string =
|
||||
(
|
||||
@ -57,7 +59,9 @@ module Email
|
||||
+@visit_link_to_respond_key
|
||||
end
|
||||
)
|
||||
string << "_pm" if @opts[:private_reply]
|
||||
if @opts[:private_reply] && @opts[:username] != Discourse.system_user.username
|
||||
string << "_pm"
|
||||
end
|
||||
end
|
||||
@template_args[:respond_instructions] = "---\n" + I18n.t(string, @template_args)
|
||||
end
|
||||
|
Reference in New Issue
Block a user