mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 15:48:43 -05:00
FIX: don't tell staged users they can visit topics in email notifications
This commit is contained in:
parent
936c785952
commit
21b51090bf
3 changed files with 9 additions and 5 deletions
|
@ -327,6 +327,7 @@ class UserNotifications < ActionMailer::Base
|
|||
add_unsubscribe_via_email_link: user.user_option.mailing_list_mode,
|
||||
unsubscribe_url: post.topic.unsubscribe_url,
|
||||
allow_reply_by_email: allow_reply_by_email,
|
||||
only_reply_by_email: allow_reply_by_email && user.staged,
|
||||
use_site_subject: use_site_subject,
|
||||
add_re_to_subject: add_re_to_subject,
|
||||
show_category_in_subject: show_category_in_subject,
|
||||
|
@ -336,7 +337,7 @@ class UserNotifications < ActionMailer::Base
|
|||
html_override: html,
|
||||
site_description: SiteSetting.site_description,
|
||||
site_title: SiteSetting.title,
|
||||
style: :notification
|
||||
style: :notification,
|
||||
}
|
||||
|
||||
# If we have a display name, change the from address
|
||||
|
|
|
@ -2004,8 +2004,9 @@ en:
|
|||
|
||||
header_instructions: ''
|
||||
reply_by_email: "[Visit Topic](%{base_url}%{url}) or reply to this email to respond"
|
||||
visit_link_to_respond: "[Visit Topic](%{base_url}%{url}) to respond"
|
||||
reply_by_email_pm: "[Visit Message](%{base_url}%{url}) or reply to this email to respond"
|
||||
only_reply_by_email: "Reply to this email to respond"
|
||||
visit_link_to_respond: "[Visit Topic](%{base_url}%{url}) to respond"
|
||||
visit_link_to_respond_pm: "[Visit Message](%{base_url}%{url}) to respond"
|
||||
|
||||
posted_by: "Posted by %{username} on %{post_date}"
|
||||
|
|
|
@ -33,11 +33,13 @@ module Email
|
|||
if @opts[:include_respond_instructions] == false
|
||||
@template_args[:respond_instructions] = ''
|
||||
else
|
||||
@template_args[:respond_instructions] = if allow_reply_by_email?
|
||||
@opts[:private_reply] ? I18n.t('user_notifications.reply_by_email_pm', @template_args) : I18n.t('user_notifications.reply_by_email', @template_args)
|
||||
if @opts[:only_reply_by_email]
|
||||
string = "user_notifications.only_reply_by_email"
|
||||
else
|
||||
@opts[:private_reply] ? I18n.t('user_notifications.visit_link_to_respond_pm', @template_args) : I18n.t('user_notifications.visit_link_to_respond', @template_args)
|
||||
string = allow_reply_by_email? ? "user_notifications.reply_by_email" : "user_notifications.visit_link_to_respond"
|
||||
string << "_pm" if @opts[:private_reply]
|
||||
end
|
||||
@template_args[:respond_instructions] = I18n.t(string, @template_args)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue