diff options
author | Rémy Coutable <remy@rymai.me> | 2016-07-04 17:29:28 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-07-04 17:29:28 +0300 |
commit | 4834e2e60936d9f59f3dd315d6d9d4ef82eecd66 (patch) | |
tree | b5c6cc56019b187a5493f8ea2d7faae02969bd5c /app/models/event.rb | |
parent | f60b48bdcb4762451618fe03bca98581282a0904 (diff) |
Fix diff comments not showing up in activity feed
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'app/models/event.rb')
-rw-r--r-- | app/models/event.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/event.rb b/app/models/event.rb index d7d23c7ae6d..e0c52fed6fb 100644 --- a/app/models/event.rb +++ b/app/models/event.rb @@ -67,7 +67,7 @@ class Event < ActiveRecord::Base elsif issue? || issue_note? Ability.abilities.allowed?(user, :read_issue, note? ? note_target : target) else - ((merge_request? || note?) && target) || milestone? + ((merge_request? || note?) && target.present?) || milestone? end end @@ -136,7 +136,7 @@ class Event < ActiveRecord::Base end def note? - target_type == "Note" + %w[Note LegacyDiffNote].include?(target_type) end def issue? |