From 58867eff46dc6886b85bfe5a787341f224d09421 Mon Sep 17 00:00:00 2001 From: Zeger-Jan van de Weg Date: Wed, 9 Dec 2015 11:59:25 +0100 Subject: Unsubscribe from thread through link in email footer --- app/models/sent_notification.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'app/models/sent_notification.rb') diff --git a/app/models/sent_notification.rb b/app/models/sent_notification.rb index f36eda1531b..fd12615717b 100644 --- a/app/models/sent_notification.rb +++ b/app/models/sent_notification.rb @@ -25,8 +25,6 @@ class SentNotification < ActiveRecord::Base class << self def reply_key - return nil unless Gitlab::IncomingEmail.enabled? - SecureRandom.hex(16) end @@ -59,7 +57,7 @@ class SentNotification < ActiveRecord::Base def record_note(note, recipient_id, reply_key, params = {}) params[:line_code] = note.line_code - + record(note.noteable, recipient_id, reply_key, params) end end @@ -75,4 +73,8 @@ class SentNotification < ActiveRecord::Base super end end + + def to_param + self.reply_key + end end -- cgit v1.2.3