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:
authorDouwe Maan <douwe@gitlab.com>2015-09-21 10:46:47 +0300
committerDouwe Maan <douwe@gitlab.com>2015-09-21 11:35:37 +0300
commitee028d9d60522f8993a0b2429ac8a0631d59229a (patch)
tree5e028593ff4394df287de8f61824c8d004a81688 /app/models/sent_notification.rb
parent11bbc06b4bbcb678f3ee6b8f1d143ed86d25a76c (diff)
Rename reply_by_email to incoming_email to prepare for the future.
Diffstat (limited to 'app/models/sent_notification.rb')
-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 33b113a2a27..2724af8e613 100644
--- a/app/models/sent_notification.rb
+++ b/app/models/sent_notification.rb
@@ -23,6 +23,12 @@ class SentNotification < ActiveRecord::Base
validates :commit_id, presence: true, if: :for_commit?
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