mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Feature: Include participants at the bottom of PM emails (#5797)
* Feature: Include participants at the bottom of PM emails ... as undecorated links. https://meta.discourse.org/t/email-notification-recipients-unclear-when-pm-is-sent-to-multiple-users/26934/13?u=featheredtoast Fix: missing translation for PM mentions * display membership count as `group (count)`
This commit is contained in:
@@ -96,6 +96,13 @@ module Email
|
||||
html_override.gsub!("%{respond_instructions}", "")
|
||||
end
|
||||
|
||||
if @template_args[:participants].present?
|
||||
participants = PrettyText.cook(@template_args[:participants], sanitize: false).html_safe
|
||||
html_override.gsub!("%{participants}", participants)
|
||||
else
|
||||
html_override.gsub!("%{participants}", "")
|
||||
end
|
||||
|
||||
styled = Email::Styles.new(html_override, @opts)
|
||||
styled.format_basic
|
||||
if style = @opts[:style]
|
||||
@@ -112,6 +119,12 @@ module Email
|
||||
body = @opts[:body]
|
||||
body = I18n.t("#{@opts[:template]}.text_body_template", template_args).dup if @opts[:template]
|
||||
|
||||
if @template_args[:participants].present?
|
||||
body << "\n"
|
||||
body << @template_args[:participants]
|
||||
body << "\n"
|
||||
end
|
||||
|
||||
if @template_args[:unsubscribe_instructions].present?
|
||||
body << "\n"
|
||||
body << @template_args[:unsubscribe_instructions]
|
||||
|
||||
@@ -97,6 +97,7 @@ module Email
|
||||
style('.lightbox-wrapper .meta', 'display: none')
|
||||
correct_first_body_margin
|
||||
correct_footer_style
|
||||
style('div.undecorated-link-footer a', "font-weight: normal;")
|
||||
reset_tables
|
||||
onebox_styles
|
||||
plugin_styles
|
||||
|
||||
Reference in New Issue
Block a user