mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
BUGFIX: add [PM] string to private message emails
This commit is contained in:
parent
9be481f035
commit
4bea4cbcaa
2 changed files with 14 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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}"
|
||||
|
|
Loading…
Reference in a new issue