Commit ba4f0abf authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

wall comment does not create an event on dashboard any more

parent b1bd3f12
module NotesHelper
# Helps to distinguish e.g. commit notes in mr notes list
def note_for_main_target?(note)
note.for_wall? ||
(@target_type.camelize == note.noteable_type && !note.for_diff_line?)
end
......
......@@ -4,9 +4,12 @@ class ActivityObserver < ActiveRecord::Observer
def after_create(record)
event_author_id = record.author_id
# Skip status notes
if record.kind_of?(Note) && record.note.include?("_Status changed to ")
return true
if record.kind_of?(Note)
# Skip system status notes like 'status changed to close'
return true if record.note.include?("_Status changed to ")
# Skip wall notes to prevent spaming of dashboard
return true if record.noteable_type.blank?
end
if event_author_id
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment