]> git.cworth.org Git - sup/commitdiff
bugfix: edit-as-new now preserves reply-to and references
authorWilliam Morgan <w@masanjin.net>
Sat, 31 May 2008 17:04:58 +0000 (17:04 +0000)
committerWilliam Morgan <w@masanjin.net>
Sat, 31 May 2008 17:04:58 +0000 (17:04 +0000)
lib/sup/modes/compose-mode.rb
lib/sup/modes/thread-view-mode.rb

index 7674d7bda63538c5014e4e32aa4740f13203f01f..e728fe5bb597cd832b84eaee2d6b11e8114822a0 100644 (file)
@@ -9,6 +9,8 @@ class ComposeMode < EditMessageMode
     header["Cc"] = opts[:cc].map { |p| p.full_address }.join(", ") if opts[:cc]
     header["Bcc"] = opts[:bcc].map { |p| p.full_address }.join(", ") if opts[:bcc]
     header["Subject"] = opts[:subj] if opts[:subj]
+    header["References"] = opts[:refs].map { |r| "<#{r}>" }.join(" ") if opts[:refs]
+    header["In-Reply-To"] = opts[:replytos].map { |r| "<#{r}>" }.join(" ") if opts[:replytos]
 
     super :header => header, :body => (opts[:body] || [])
   end
index b96576eee58512cef3a02c1ca68db3c52738f7f8..81a2aba0abac8c7f62dfbe95d1b53a0a07bd1836 100644 (file)
@@ -250,7 +250,7 @@ EOS
 
   def edit_as_new
     m = @message_lines[curpos] or return
-    mode = ComposeMode.new(:body => m.quotable_body_lines, :to => m.to, :cc => m.cc, :subj => m.subj, :bcc => m.bcc)
+    mode = ComposeMode.new(:body => m.quotable_body_lines, :to => m.to, :cc => m.cc, :subj => m.subj, :bcc => m.bcc, :refs => m.refs, :replytos => m.replytos)
     BufferManager.spawn "edit as new", mode
     mode.edit_message
   end