mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:11:08 +08:00
Don't allow sending private messages to suspended users. Emails to suspended users should tell them how to respond, since they can't.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
# Builds a Mail::Mesage we can use for sending. Optionally supports using a template
|
||||
# Builds a Mail::Message we can use for sending. Optionally supports using a template
|
||||
# for the body and subject
|
||||
module Email
|
||||
|
||||
@ -26,12 +26,16 @@ module Email
|
||||
user_preferences_url: "#{Discourse.base_url}/my/preferences" }.merge!(@opts)
|
||||
|
||||
if @template_args[:url].present?
|
||||
@template_args[:respond_instructions] =
|
||||
if allow_reply_by_email?
|
||||
I18n.t('user_notifications.reply_by_email', @template_args)
|
||||
else
|
||||
I18n.t('user_notifications.visit_link_to_respond', @template_args)
|
||||
end
|
||||
if @opts[:include_respond_instructions] == false
|
||||
@template_args[:respond_instructions] = ''
|
||||
else
|
||||
@template_args[:respond_instructions] =
|
||||
if allow_reply_by_email?
|
||||
I18n.t('user_notifications.reply_by_email', @template_args)
|
||||
else
|
||||
I18n.t('user_notifications.visit_link_to_respond', @template_args)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user