mirror of
https://github.com/redmine/redmine.git
synced 2025-11-06 13:25:44 +01:00
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
This commit is contained in:
@@ -100,7 +100,7 @@ class MailHandler < ActionMailer::Base
|
|||||||
elsif m = email.subject.match(MESSAGE_REPLY_SUBJECT_RE)
|
elsif m = email.subject.match(MESSAGE_REPLY_SUBJECT_RE)
|
||||||
receive_message_reply(m[1].to_i)
|
receive_message_reply(m[1].to_i)
|
||||||
else
|
else
|
||||||
receive_issue
|
dispatch_to_default
|
||||||
end
|
end
|
||||||
rescue ActiveRecord::RecordInvalid => e
|
rescue ActiveRecord::RecordInvalid => e
|
||||||
# TODO: send a email to the user
|
# TODO: send a email to the user
|
||||||
@@ -114,6 +114,10 @@ class MailHandler < ActionMailer::Base
|
|||||||
false
|
false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def dispatch_to_default
|
||||||
|
receive_issue
|
||||||
|
end
|
||||||
|
|
||||||
# Creates a new issue
|
# Creates a new issue
|
||||||
def receive_issue
|
def receive_issue
|
||||||
project = target_project
|
project = target_project
|
||||||
|
|||||||
Reference in New Issue
Block a user