c3a940000e
- allows unsubscription processing of email in format "reply+%{key}+unsubscribe@acme.com" (example) - if config.address includes %{key} and replies are enabled every unsubscriable message will include mailto: link in its List-Unsubscribe header
18 lines
482 B
Ruby
18 lines
482 B
Ruby
require 'gitlab/email/handler/create_note_handler'
|
|
require 'gitlab/email/handler/create_issue_handler'
|
|
require 'gitlab/email/handler/unsubscribe_handler'
|
|
|
|
module Gitlab
|
|
module Email
|
|
module Handler
|
|
HANDLERS = [UnsubscribeHandler, CreateNoteHandler, CreateIssueHandler]
|
|
|
|
def self.for(mail, mail_key)
|
|
HANDLERS.find do |klass|
|
|
handler = klass.new(mail, mail_key)
|
|
break handler if handler.can_handle?
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|