From 35ce7aae019462b5b39b89a4f900a0c100ff71bd Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Mon, 25 Jul 2016 22:51:26 -0600 Subject: Use sha1 of discussion ID. --- app/models/diff_note.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/models/diff_note.rb') diff --git a/app/models/diff_note.rb b/app/models/diff_note.rb index 3edbdf9f966..8c99be7df8a 100644 --- a/app/models/diff_note.rb +++ b/app/models/diff_note.rb @@ -34,11 +34,11 @@ class DiffNote < Note end def discussion_id - @discussion_id ||= self.class.build_discussion_id(noteable_type, noteable_id || commit_id, position) + @discussion_id ||= Digest::SHA1.hexdigest(self.class.build_discussion_id(noteable_type, noteable_id || commit_id, position)) end def original_discussion_id - @original_discussion_id ||= self.class.build_discussion_id(noteable_type, noteable_id || commit_id, original_position) + @original_discussion_id ||= Digest::SHA1.hexdigest(self.class.build_discussion_id(noteable_type, noteable_id || commit_id, original_position)) end def position=(new_position) -- cgit v1.2.1