diff --git a/lib/sup/modes/reply_mode.rb b/lib/sup/modes/reply_mode.rb index 4225d0f3d..bcaf182d3 100644 --- a/lib/sup/modes/reply_mode.rb +++ b/lib/sup/modes/reply_mode.rb @@ -97,28 +97,30 @@ def initialize message, type_arg=nil @headers = {} @headers[:recipient] = { - "To" => cc.map { |p| p.full_address }, + "To" => (cc.map { |p| p.email == "sup@fake.sender.example.com" ? nil : p.email}.compact), "Cc" => [], } if useful_recipient ## typically we don't want to have a reply-to-sender option if the sender ## is a user account. however, if the cc is empty, it's a message to ## ourselves, so for the lack of any other options, we'll add it. - @headers[:sender] = { - "To" => [to.full_address], - "Cc" => [], - } if !AccountManager.is_account?(to) || !useful_recipient + if !AccountManager.is_account?(to) || !useful_recipient + @headers[:sender] = { + "To" => [to.full_address], + "Cc" => [], + } unless to.email == "sup@fake.sender.example.com" + end @headers[:user] = { "To" => [], "Cc" => [], } - + not_me_ccs = cc.select { |p| !AccountManager.is_account?(p) } @headers[:all] = { "To" => [to.full_address], - "Cc" => not_me_ccs.map { |p| p.full_address }, - } unless not_me_ccs.empty? + "Cc" => (not_me_ccs.map { |p| p.email == "sup@fake.sender.example.com" ? nil : p.email }.compact), + } unless not_me_ccs.empty? or to.email == "sup@fake.sender.example.com" @headers[:list] = { "To" => [@m.list_address.full_address], @@ -142,7 +144,7 @@ def initialize message, type_arg=nil elsif @headers.member? :sender :sender else - :recipient + :user end) headers_full = { diff --git a/lib/sup/version.rb b/lib/sup/version.rb index cdff2dd00..898ed5e93 100644 --- a/lib/sup/version.rb +++ b/lib/sup/version.rb @@ -1,3 +1,3 @@ module Redwood - VERSION = "git" + VERSION = "0.21.0" end