From: wmorgan Date: Tue, 14 Aug 2007 18:26:54 +0000 (+0000) Subject: better reply from handling X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=5357ad14812b08b2cff8fb345fb96faae4644cdc;p=sup better reply from handling git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@527 5c8cc53c-5e98-4d25-b20a-d8db53a31250 --- 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