mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
FEATURE: add Precedence header
This commit is contained in:
parent
0c739bb5b6
commit
47d48b4dd8
2 changed files with 12 additions and 0 deletions
|
@ -87,6 +87,9 @@ module Email
|
||||||
@message.header['List-ID'] = list_id
|
@message.header['List-ID'] = list_id
|
||||||
|
|
||||||
@message.header['List-Archive'] = topic.url if topic
|
@message.header['List-Archive'] = topic.url if topic
|
||||||
|
|
||||||
|
# http://www.ietf.org/rfc/rfc3834.txt
|
||||||
|
@message.header['Precedence'] = 'list'
|
||||||
end
|
end
|
||||||
|
|
||||||
if reply_key.present?
|
if reply_key.present?
|
||||||
|
|
|
@ -73,6 +73,15 @@ describe Email::Sender do
|
||||||
Then { expect(message.header['List-ID']).to be_present }
|
Then { expect(message.header['List-ID']).to be_present }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context "adds Precedence header" do
|
||||||
|
before do
|
||||||
|
message.header['X-Discourse-Topic-Id'] = 5577
|
||||||
|
end
|
||||||
|
|
||||||
|
When { email_sender.send }
|
||||||
|
Then { expect(message.header['Precedence']).to be_present }
|
||||||
|
end
|
||||||
|
|
||||||
context 'email logs' do
|
context 'email logs' do
|
||||||
let(:email_log) { EmailLog.last }
|
let(:email_log) { EmailLog.last }
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue