commit 5357ad14812b08b2cff8fb345fb96faae4644cdc
parent d6e7457546de60916c1ca51f5f55a998a943c505
Author: wmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Date: Tue, 14 Aug 2007 18:26:54 +0000
better reply from handling
git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@527 5c8cc53c-5e98-4d25-b20a-d8db53a31250
Diffstat:
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/lib/sup/modes/reply-mode.rb b/lib/sup/modes/reply-mode.rb
@@ -24,11 +24,13 @@ class ReplyMode < EditMessageMode
body = reply_body_lines message
from =
- if @m.recipient_email
- AccountManager.account_for @m.recipient_email
+ if @m.recipient_email && (a = AccountManager.account_for(@m.recipient_email))
+ a
+ elsif(b = (@m.to + @m.cc).find { |p| AccountManager.is_account? p })
+ b
else
- (@m.to + @m.cc).find { |p| AccountManager.is_account? p }
- end || AccountManager.default_account
+ AccountManager.default_account
+ end
## ignore reply-to for list messages because it's typically set to
## the list address, which we explicitly treat with :list