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:
Diffstat (limited to 'app/models/note.rb')
-rw-r--r--app/models/note.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/note.rb b/app/models/note.rb
index 77f7726079c..fdc972d9726 100644
--- a/app/models/note.rb
+++ b/app/models/note.rb
@@ -259,6 +259,10 @@ class Note < ApplicationRecord
noteable_type == 'AlertManagement::Alert'
end
+ def for_project_snippet?
+ noteable.is_a?(ProjectSnippet)
+ end
+
def for_personal_snippet?
noteable.is_a?(PersonalSnippet)
end
@@ -542,7 +546,7 @@ class Note < ApplicationRecord
end
def skip_notification?
- review.present?
+ review.present? || author.blocked? || author.ghost?
end
private