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@selenight.nl>2016-07-26 07:51:26 +0300
committerDouwe Maan <douwe@selenight.nl>2016-07-26 07:51:26 +0300
commit35ce7aae019462b5b39b89a4f900a0c100ff71bd (patch)
treeeea8997116b141a89ebf700da92bc1fee32f4093 /app/models/note.rb
parentaa26767897ebaa007b63bbb8ee7586534e94906a (diff)
Use sha1 of discussion ID.
Diffstat (limited to 'app/models/note.rb')
-rw-r--r--app/models/note.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/note.rb b/app/models/note.rb
index 7668f3378e9..2c23e04e545 100644
--- a/app/models/note.rb
+++ b/app/models/note.rb
@@ -145,9 +145,9 @@ class Note < ActiveRecord::Base
def discussion_id
@discussion_id ||=
if for_merge_request?
- [:discussion, :note, id].join("-")
+ Digest::SHA1.hexdigest([:discussion, :note, id].join("-"))
else
- self.class.build_discussion_id(noteable_type, noteable_id || commit_id)
+ Digest::SHA1.hexdigest(self.class.build_discussion_id(noteable_type, noteable_id || commit_id))
end
end