commit 7321da2d481d34bc7e18b9948d4b5edc618c9c9e
parent 9811f424a923bfe455784ac4fb8abdafce2c4c06
Author: wmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Date: Sun, 17 Jun 2007 19:35:41 +0000
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
Diffstat:
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git 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] = {