summaryrefslogtreecommitdiffstats
path: root/app/models/mail_handler.rb
diff options
context:
space:
mode:
authorJean-Baptiste Barth <jeanbaptiste.barth@gmail.com>2011-02-12 10:08:11 +0000
committerJean-Baptiste Barth <jeanbaptiste.barth@gmail.com>2011-02-12 10:08:11 +0000
commit8b5ebd92c98a9e4991bec563d9b6b8d42fc35f1c (patch)
tree886927d7151b18434de0ff871457671d8ac8e61d /app/models/mail_handler.rb
parent3493bb1d3709b7071548c11233b3ac5535f0d0c6 (diff)
downloadredmine-8b5ebd92c98a9e4991bec563d9b6b8d42fc35f1c.tar.gz
redmine-8b5ebd92c98a9e4991bec563d9b6b8d42fc35f1c.zip
Introduced MailHandler#dispatch_to_default method to make MailHandler more extensible. #7598
Contributed by Yuki Sonoda git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4820 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/mail_handler.rb')
-rw-r--r--app/models/mail_handler.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/mail_handler.rb b/app/models/mail_handler.rb
index 1410a6091..e509d0918 100644
--- a/app/models/mail_handler.rb
+++ b/app/models/mail_handler.rb
@@ -100,7 +100,7 @@ class MailHandler < ActionMailer::Base
elsif m = email.subject.match(MESSAGE_REPLY_SUBJECT_RE)
receive_message_reply(m[1].to_i)
else
- receive_issue
+ dispatch_to_default
end
rescue ActiveRecord::RecordInvalid => e
# TODO: send a email to the user
@@ -113,6 +113,10 @@ class MailHandler < ActionMailer::Base
logger.error "MailHandler: unauthorized attempt from #{user}" if logger
false
end
+
+ def dispatch_to_default
+ receive_issue
+ end
# Creates a new issue
def receive_issue