Skip to content

Commit

Permalink
BUGFIX: add [PM] string to private message emails
Browse files Browse the repository at this point in the history
  • Loading branch information
SamSaffron committed Jan 21, 2014
1 parent 9be481f commit 4bea4cb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/mailers/user_notifications.rb
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,9 @@ def notification_email(user, opts)
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 = {
Expand All @@ -155,10 +156,9 @@ def notification_email(user, opts)
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
Expand Down
10 changes: 10 additions & 0 deletions config/locales/server.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down

0 comments on commit 4bea4cb

Please sign in to comment.