mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 16:22:20 +08:00
DEV add modifiers to message_builder so plugins can customize subject/body/html (#26867)
This commit is contained in:
@ -126,7 +126,7 @@ module Email
|
||||
else
|
||||
subject = @opts[:subject]
|
||||
end
|
||||
subject
|
||||
DiscoursePluginRegistry.apply_modifier(:message_builder_subject, subject, @opts)
|
||||
end
|
||||
|
||||
def html_part
|
||||
@ -164,6 +164,7 @@ module Email
|
||||
html_body: html_override.html_safe,
|
||||
},
|
||||
)
|
||||
html = DiscoursePluginRegistry.apply_modifier(:message_builder_html_part, html, @opts)
|
||||
|
||||
Mail::Part.new do
|
||||
content_type "text/html; charset=UTF-8"
|
||||
@ -184,8 +185,7 @@ module Email
|
||||
body << "\n"
|
||||
body << @template_args[:unsubscribe_instructions]
|
||||
end
|
||||
|
||||
body
|
||||
DiscoursePluginRegistry.apply_modifier(:message_builder_body, body, @opts)
|
||||
end
|
||||
|
||||
def build_args
|
||||
|
Reference in New Issue
Block a user