From f3135533c2bd9c99ab95729a628afde9cb557a92 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Sat, 14 Jun 2014 12:29:50 -0400 Subject: [PATCH] Add some more mail headers back --- lib/email/sender.rb | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/email/sender.rb b/lib/email/sender.rb index 210fd395bb0..b62817cf226 100644 --- a/lib/email/sender.rb +++ b/lib/email/sender.rb @@ -72,13 +72,17 @@ module Email # http://www.ietf.org/rfc/rfc2919.txt list_id = "" @message.header['List-ID'] = list_id - # can't figure out how to get the current URL of the topic here - #@message.header['List-Archive'] = + + topic = Topic.where(id: topic_id).first + @message.header['List-Archive'] = topic.url if topic end if reply_key.present? - # in github notifications, these fields are identical - #@message.header['List-Post'] = @message.header['Reply-To'] + + if @message.header['Reply-To'] =~ /\<([^\>]+)\>/ + email = Regexp.last_match[1] + @message.header['List-Post'] = "" + end end email_log.post_id = post_id if post_id.present?