Merge branch 'ticket/master/170-mail-handler-dispatch'

This commit is contained in:
Eric Davis 2011-02-16 16:53:14 -08:00
commit 31df55421b
1 changed files with 9 additions and 1 deletions

View File

@ -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,14 @@ class MailHandler < ActionMailer::Base
logger.error "MailHandler: unauthorized attempt from #{user}" if logger
false
end
# Dispatch the mail to the default method handler, receive_issue
#
# This can be overridden or patched to support handling other incoming
# email types
def dispatch_to_default
receive_issue
end
# Creates a new issue
def receive_issue