]> git.cworth.org Git - sup/commitdiff
bugfix
authorwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Mon, 10 Sep 2007 16:30:00 +0000 (16:30 +0000)
committerwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Mon, 10 Sep 2007 16:30:00 +0000 (16:30 +0000)
git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@560 5c8cc53c-5e98-4d25-b20a-d8db53a31250

lib/sup/modes/edit-message-mode.rb

index 579fe105df42e7102c7bdaf5df372194a60f48a4..655ca204ed079231cc2eba4cb5a02f244f4f3c05 100644 (file)
@@ -201,9 +201,9 @@ protected
   end
 
   def send_message
-    return if !edited? && !BufferManager.ask_yes_or_no("Message unedited. Really send?")
-    return if $config[:confirm_no_attachments] && mentions_attachments? && @attachments.size == 0 && !BufferManager.ask_yes_or_no("You haven't added any attachments. Really send?")#" stupid ruby-mode
-    return if $config[:confirm_top_posting] && top_posting? && !BufferManager.ask_yes_or_no("You're top posting. That makes you a bad person. Really send?") #" stupid ruby-mode
+    return false if !edited? && !BufferManager.ask_yes_or_no("Message unedited. Really send?")
+    return false if $config[:confirm_no_attachments] && mentions_attachments? && @attachments.size == 0 && !BufferManager.ask_yes_or_no("You haven't added any attachments. Really send?")#" stupid ruby-mode
+    return false if $config[:confirm_top_posting] && top_posting? && !BufferManager.ask_yes_or_no("You're top posting. That makes you a bad person. Really send?") #" stupid ruby-mode
 
     date = Time.now
     from_email = 
@@ -222,9 +222,11 @@ protected
       SentManager.write_sent_message(date, from_email) { |f| write_full_message_to f, date }
       BufferManager.kill_buffer buffer
       BufferManager.flash "Message sent!"
+      true
     rescue SystemCallError, SendmailCommandFailed => e
       Redwood::log "Problem sending mail: #{e.message}"
       BufferManager.flash "Problem sending mail: #{e.message}"
+      false
     end
   end