BUGFIX: add [PM] string to private message emails

This commit is contained in:
Sam 2014-01-21 17:24:05 +11:00
parent 9be481f035
commit 4bea4cbcaa
2 changed files with 14 additions and 4 deletions

View file

@ -141,8 +141,9 @@ class UserNotifications < ActionMailer::Base
locals: { context_posts: context_posts, post: @post }
)
template = "user_notifications.user_#{notification_type}"
if @post.topic.private_message?
opts[:subject_prefix] = "[#{I18n.t('private_message_abbrev')}] "
template << "_pm"
end
email_opts = {
@ -155,10 +156,9 @@ class UserNotifications < ActionMailer::Base
username: username,
add_unsubscribe_link: true,
allow_reply_by_email: opts[:allow_reply_by_email],
template: "user_notifications.user_#{notification_type}",
template: template,
html_override: html,
style: :notification,
subject_prefix: opts[:subject_prefix] || ''
style: :notification
}
# If we have a display name, change the from address

View file

@ -1183,6 +1183,16 @@ en:
---
%{respond_instructions}
user_posted_pm:
subject_template: "[%{site_name}] [PM] %{topic_title}"
text_body_template: |
%{message}
%{context}
---
%{respond_instructions}
digest:
why: "Here's a brief summary of the discussion on %{site_link} since we last saw you on %{last_seen_at}."
subject_template: "[%{site_name}] Forum Activity for %{date}"