]> git.cworth.org Git - sup/commitdiff
fix from email bug
authorwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Thu, 29 Nov 2007 18:12:36 +0000 (18:12 +0000)
committerwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Thu, 29 Nov 2007 18:12:36 +0000 (18:12 +0000)
git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@736 5c8cc53c-5e98-4d25-b20a-d8db53a31250

lib/sup/modes/reply-mode.rb
lib/sup/person.rb

index 8ecf8377a13838b7a3d8402d8f50d013c33f3f87..180ae4e7f8c70e6330594ffff62765426072eead 100644 (file)
@@ -27,10 +27,10 @@ class ReplyMode < EditMessageMode
       if @m.recipient_email && (a = AccountManager.account_for(@m.recipient_email))
         [@m.recipient_email, a]
       elsif(b = (@m.to + @m.cc).find { |p| AccountManager.is_account? p })
-        [b.full_address, b]
+        [nil, b]
       else
         c = AccountManager.default_account
-        [c.full_address, c]
+        [nil, c]
       end
 
     ## ignore reply-to for list messages because it's typically set to
index dba7f5fd9233e3a7341fd4f11d2102966d9f1c3e..8727b1cbcec8c27a3befe3c5a7e6e780de3c35cd 100644 (file)
@@ -114,7 +114,8 @@ class Person
 
   def mediumname; @name || @email; end
 
-  def full_address email=@email
+  def full_address email=nil
+    email ||= @email
     if @name && email
       if @name =~ /[",@]/
         "#{@name.inspect} <#{email}>" # escape quotes