From 5357ad14812b08b2cff8fb345fb96faae4644cdc Mon Sep 17 00:00:00 2001 From: wmorgan Date: Tue, 14 Aug 2007 18:26:54 +0000 Subject: [PATCH] better reply from handling git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@527 5c8cc53c-5e98-4d25-b20a-d8db53a31250 --- lib/sup/modes/reply-mode.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/sup/modes/reply-mode.rb b/lib/sup/modes/reply-mode.rb index 15ccd97..63644b4 100644 --- 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 -- 2.45.2