mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 04:11:33 +08:00
DEV: Pass recipient email address to message_builder modifiers (#27308)
This commit is contained in:
parent
0ddad8fc64
commit
d42a1c8885
|
@ -28,12 +28,14 @@ module Email
|
|||
:message_builder_visit_link_to_respond,
|
||||
"user_notifications.visit_link_to_respond",
|
||||
@opts,
|
||||
@to,
|
||||
)
|
||||
@reply_by_email_key =
|
||||
DiscoursePluginRegistry.apply_modifier(
|
||||
:message_builder_reply_by_email,
|
||||
"user_notifications.reply_by_email",
|
||||
@opts,
|
||||
@to,
|
||||
)
|
||||
|
||||
if @opts[:include_respond_instructions] == false
|
||||
|
@ -136,7 +138,7 @@ module Email
|
|||
else
|
||||
subject = @opts[:subject]
|
||||
end
|
||||
DiscoursePluginRegistry.apply_modifier(:message_builder_subject, subject, @opts)
|
||||
DiscoursePluginRegistry.apply_modifier(:message_builder_subject, subject, @opts, @to)
|
||||
end
|
||||
|
||||
def html_part
|
||||
|
@ -174,7 +176,7 @@ module Email
|
|||
html_body: html_override.html_safe,
|
||||
},
|
||||
)
|
||||
html = DiscoursePluginRegistry.apply_modifier(:message_builder_html_part, html, @opts)
|
||||
html = DiscoursePluginRegistry.apply_modifier(:message_builder_html_part, html, @opts, @to)
|
||||
|
||||
Mail::Part.new do
|
||||
content_type "text/html; charset=UTF-8"
|
||||
|
@ -195,7 +197,7 @@ module Email
|
|||
body << "\n"
|
||||
body << @template_args[:unsubscribe_instructions]
|
||||
end
|
||||
DiscoursePluginRegistry.apply_modifier(:message_builder_body, body, @opts)
|
||||
DiscoursePluginRegistry.apply_modifier(:message_builder_body, body, @opts, @to)
|
||||
end
|
||||
|
||||
def build_args
|
||||
|
|
Loading…
Reference in New Issue
Block a user