From: wmorgan Date: Sun, 17 Jun 2007 19:35:41 +0000 (+0000) Subject: reply to all now excludes your email address(es) X-Git-Url: https://git.notmuchmail.org/git?a=commitdiff_plain;h=7321da2d481d34bc7e18b9948d4b5edc618c9c9e;p=sup reply to all now excludes your email address(es) git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@461 5c8cc53c-5e98-4d25-b20a-d8db53a31250 --- diff --git a/lib/sup/modes/reply-mode.rb b/lib/sup/modes/reply-mode.rb index e29bf57..779bd86 100644 --- a/lib/sup/modes/reply-mode.rb +++ b/lib/sup/modes/reply-mode.rb @@ -26,16 +26,15 @@ class ReplyMode < EditMessageMode from = if @m.recipient_email - AccountManager.account_for(@m.recipient_email) + AccountManager.account_for @m.recipient_email else (@m.to + @m.cc).find { |p| AccountManager.is_account? p } end || AccountManager.default_account - #from_email = @m.recipient_email || from.email from_email = from.email ## ignore reply-to for list messages because it's typically set to - ## the list address anyways + ## the list address, which we explicitly treat with :list to = @m.is_list_message? ? @m.from : (@m.replyto || @m.from) cc = (@m.to + @m.cc - [from, to]).uniq @@ -57,7 +56,7 @@ class ReplyMode < EditMessageMode @headers[:all] = { "From" => "#{from.name} <#{from_email}>", "To" => [to.full_address], - "Cc" => cc.map { |p| p.full_address }, + "Cc" => cc.select { |p| !AccountManager.is_account?(p) }.map { |p| p.full_address }, } unless cc.empty? @headers[:list] = {