]> git.cworth.org Git - sup/commitdiff
allow signature hook to return :none for no signature
authorWilliam Morgan <wmorgan-sup@masanjin.net>
Fri, 6 Jun 2008 19:16:11 +0000 (12:16 -0700)
committerWilliam Morgan <wmorgan-sup@masanjin.net>
Fri, 6 Jun 2008 19:16:11 +0000 (12:16 -0700)
lib/sup/modes/edit-message-mode.rb

index b63a00b724ae05462894ae43e3e3370431c02a86..cc6e7af4a482d46dfefd74f5034846c81035620d 100644 (file)
@@ -23,7 +23,7 @@ Variables:
   from_email: the email part of the From: line, or nil if empty
 Return value:
   A string (multi-line ok) containing the text of the signature, or nil to
-  use the default signature.
+  use the default signature, or :none for no signature.
 EOS
 
   HookManager.register "before-edit", <<EOS
@@ -417,6 +417,8 @@ private
 
     ## first run the hook
     hook_sig = HookManager.run "signature", :header => @header, :from_email => from_email
+
+    return [] if hook_sig == :none
     return ["", "-- "] + hook_sig.split("\n") if hook_sig
 
     ## no hook, do default signature generation based on config.yaml