mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
FEATURE: include email_prefix in digest email subject instead of site title
This commit is contained in:
parent
f18140b81f
commit
5180d3e355
2 changed files with 8 additions and 1 deletions
|
@ -54,7 +54,7 @@ class UserNotifications < ActionMailer::Base
|
||||||
|
|
||||||
min_date = opts[:since] || @user.last_emailed_at || @user.last_seen_at || 1.month.ago
|
min_date = opts[:since] || @user.last_emailed_at || @user.last_seen_at || 1.month.ago
|
||||||
|
|
||||||
@site_name = SiteSetting.title
|
@site_name = SiteSetting.email_prefix.presence || SiteSetting.title
|
||||||
|
|
||||||
@header_color = ColorScheme.hex_for_name('header_background')
|
@header_color = ColorScheme.hex_for_name('header_background')
|
||||||
@last_seen_at = short_date(@user.last_seen_at || @user.created_at)
|
@last_seen_at = short_date(@user.last_seen_at || @user.created_at)
|
||||||
|
|
|
@ -77,6 +77,13 @@ describe UserNotifications do
|
||||||
expect(subject.text_part.body.to_s).to be_present
|
expect(subject.text_part.body.to_s).to be_present
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it "includes email_prefix in email subject instead of site title" do
|
||||||
|
SiteSetting.email_prefix = "Try Discourse"
|
||||||
|
SiteSetting.title = "Discourse Meta"
|
||||||
|
|
||||||
|
expect(subject.subject).to match(/Try Discourse/)
|
||||||
|
expect(subject.subject).not_to match(/Discourse Meta/)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue