]> git.notmuchmail.org Git - sup/blobdiff - lib/sup/modes/reply-mode.rb
Merge branch 'reply-all-keybindings' into next
[sup] / lib / sup / modes / reply-mode.rb
index 6b9f55933a6ef967fc221f8b31a6f209e48bbe84..3d39a8ae602b9bdc927193da9cae59240b771b16 100644 (file)
@@ -40,7 +40,7 @@ Return value:
   The reply mode you desire, or nil to use the default behavior.
 EOS
 
-  def initialize message
+  def initialize message, type_arg=nil
     @m = message
 
     ## it's important to put this early because it forces a read of
@@ -56,7 +56,7 @@ EOS
     ## don't check that it's an Account, though; assume they know what they're
     ## doing.
     if hook_reply_from && !(hook_reply_from.is_a? Person)
-      Redwood::log "reply-from returned non-Person, using default from."
+      info "reply-from returned non-Person, using default from."
       hook_reply_from = nil
     end
 
@@ -126,7 +126,7 @@ EOS
                "To" => [],
                "Cc" => [],
                "Bcc" => [],
-               "In-Reply-To" => "<#{@m.id}>",
+               "In-reply-to" => "<#{@m.id}>",
                "Subject" => Message.reify_subj(@m.subj),
                "References" => refs,
              }.merge v
@@ -138,7 +138,9 @@ EOS
     hook_reply = HookManager.run "reply-to", :modes => types
 
     @type_selector.set_to(
-      if types.include? hook_reply
+      if types.include? type_arg
+        type_arg
+      elsif types.include? hook_reply
         hook_reply
       elsif @m.is_list_message?
         :list