Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrett Walker <bwalker@gitlab.com>2018-12-14 21:37:03 +0300
committerBrett Walker <bwalker@gitlab.com>2019-01-03 23:37:35 +0300
commit2e514314031f1722db45e2440eb1c7df105218dd (patch)
tree95f47e8c3233d1680543958e90e2629b32f62b9d /lib/gitlab/email/handler/unsubscribe_handler.rb
parent34dd6196e31b248dc614edd531105ee6b6551060 (diff)
Use new issue email address format
We now use `-issue` in order to support catch all email addresses
Diffstat (limited to 'lib/gitlab/email/handler/unsubscribe_handler.rb')
-rw-r--r--lib/gitlab/email/handler/unsubscribe_handler.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/gitlab/email/handler/unsubscribe_handler.rb b/lib/gitlab/email/handler/unsubscribe_handler.rb
index 2d679c676a5..0155d7bd113 100644
--- a/lib/gitlab/email/handler/unsubscribe_handler.rb
+++ b/lib/gitlab/email/handler/unsubscribe_handler.rb
@@ -2,7 +2,7 @@
require 'gitlab/email/handler/base_handler'
-# handles unsubscribe emails with these forms:
+# handles unsubscribe emails with these formats:
# incoming+1234567890abcdef1234567890abcdef-unsubscribe@incoming.gitlab.com
# incoming+1234567890abcdef1234567890abcdef+unsubscribe@incoming.gitlab.com (legacy)
module Gitlab
@@ -11,14 +11,14 @@ module Gitlab
class UnsubscribeHandler < BaseHandler
delegate :project, to: :sent_notification, allow_nil: true
- HANDLER_REGEX = /\A(?<replytoken>\w+)#{Gitlab::IncomingEmail::UNSUBSCRIBE_SUFFIX}\z/.freeze
- HANDLER_REGEX_LEGACY = /\A(?<replytoken>\w+)#{Regexp.escape(Gitlab::IncomingEmail::UNSUBSCRIBE_SUFFIX_OLD)}\z/.freeze
+ HANDLER_REGEX = /\A(?<reply_token>\w+)#{Gitlab::IncomingEmail::UNSUBSCRIBE_SUFFIX}\z/.freeze
+ HANDLER_REGEX_LEGACY = /\A(?<reply_token>\w+)#{Regexp.escape(Gitlab::IncomingEmail::UNSUBSCRIBE_SUFFIX_LEGACY)}\z/.freeze
def initialize(mail, mail_key)
super(mail, mail_key)
matched = HANDLER_REGEX.match(mail_key.to_s) || HANDLER_REGEX_LEGACY.match(mail_key.to_s)
- @reply_token = matched[:replytoken] if matched
+ @reply_token = matched[:reply_token] if matched
end
def can_handle?