From ee028d9d60522f8993a0b2429ac8a0631d59229a Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Mon, 21 Sep 2015 09:46:47 +0200 Subject: Rename reply_by_email to incoming_email to prepare for the future. --- app/models/sent_notification.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'app/models/sent_notification.rb') 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 -- cgit v1.2.1