diff options
author | Zeger-Jan van de Weg <zegerjan@gitlab.com> | 2016-02-19 10:10:55 +0100 |
---|---|---|
committer | Zeger-Jan van de Weg <zegerjan@gitlab.com> | 2016-02-19 10:10:55 +0100 |
commit | aba1aa49a986230d697106117b5e9b0efa97467c (patch) | |
tree | 6c09516b48673f276ffe54eeaf995694690da59c /app/models/note.rb | |
parent | 11ed1cbbb7b777a4883af6ec5b79b958881fab67 (diff) | |
download | gitlab-ce-aba1aa49a986230d697106117b5e9b0efa97467c.tar.gz |
Improve #set_award! on the Note model12792-emoji-as-text-diff-comment
Diffstat (limited to 'app/models/note.rb')
-rw-r--r-- | app/models/note.rb | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/app/models/note.rb b/app/models/note.rb index d0f950d5924..b3809ad81e0 100644 --- a/app/models/note.rb +++ b/app/models/note.rb @@ -376,9 +376,6 @@ class Note < ActiveRecord::Base def set_award! return unless awards_supported? && contains_emoji_only? - # Responding with an emoji is not an award emoji if its on a diff comment - return if line_code - self.is_award = true self.note = award_emoji_name end @@ -386,7 +383,7 @@ class Note < ActiveRecord::Base private def awards_supported? - noteable.kind_of?(Issue) || noteable.is_a?(MergeRequest) + (noteable.kind_of?(Issue) || noteable.is_a?(MergeRequest)) && !for_diff_line? end def contains_emoji_only? |