diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-09-21 09:46:47 +0200 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-09-21 10:35:37 +0200 |
commit | ee028d9d60522f8993a0b2429ac8a0631d59229a (patch) | |
tree | 5e028593ff4394df287de8f61824c8d004a81688 /app/models/sent_notification.rb | |
parent | 11bbc06b4bbcb678f3ee6b8f1d143ed86d25a76c (diff) | |
download | gitlab-ce-ee028d9d60522f8993a0b2429ac8a0631d59229a.tar.gz |
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.rb | 6 |
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 |