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:
authorRobert Speicher <robert@gitlab.com>2015-09-21 21:52:13 +0300
committerRobert Speicher <robert@gitlab.com>2015-09-21 21:52:13 +0300
commitd4a960161eecf5730b56d3f375573fa39aa67e95 (patch)
tree543dacf2fb1a37e77c4ae91cf935015e2d9f410f /app/models
parent534e548d4495e2193af6542ca8d62e7d5a3a223b (diff)
parent017219e7f548936ce348eeb445dc4717896902ec (diff)
Merge branch 'rename-reply-by-email' into 'master'
Rename reply_by_email to incoming_email to prepare for the future. Closes #2579. See merge request !1367
Diffstat (limited to 'app/models')
-rw-r--r--app/models/sent_notification.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/sent_notification.rb b/app/models/sent_notification.rb
index 03425389dd3..3eed5c16e45 100644
--- a/app/models/sent_notification.rb
+++ b/app/models/sent_notification.rb
@@ -25,6 +25,12 @@ class SentNotification < ActiveRecord::Base
validates :line_code, format: { with: /\A[a-z0-9]+_\d+_\d+\Z/ }, allow_blank: true
class << self
+ def reply_key
+ return nil unless Gitlab::IncomingEmail.enabled?
+
+ SecureRandom.hex(16)
+ end
+
def for(reply_key)
find_by(reply_key: reply_key)
end