diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-09 12:10:14 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-09 12:10:14 +0300 |
commit | 8b50d36626f3a71a2d8552a316d700510559b0de (patch) | |
tree | 154f4b0391d0943438f577559a8adad32885bfe1 /app/services/notes | |
parent | 7a544c9ef1136ce0b52e269f54ebe74d0f26ad3d (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/notes')
-rw-r--r-- | app/services/notes/create_service.rb | 2 | ||||
-rw-r--r-- | app/services/notes/update_service.rb | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/app/services/notes/create_service.rb b/app/services/notes/create_service.rb index 7dd6cd9a87c..968d0414392 100644 --- a/app/services/notes/create_service.rb +++ b/app/services/notes/create_service.rb @@ -21,6 +21,8 @@ module Notes # only, there is no need be create a note! execute_quick_actions(note) do |only_commands| + note.check_for_spam(action: :create, user: current_user) unless only_commands + note.run_after_commit do # Finish the harder work in the background NewNoteWorker.perform_async(note.id) diff --git a/app/services/notes/update_service.rb b/app/services/notes/update_service.rb index 92b41bb4cc7..ff9f39ce0be 100644 --- a/app/services/notes/update_service.rb +++ b/app/services/notes/update_service.rb @@ -25,6 +25,7 @@ module Notes if note.note_changed? note.assign_attributes(last_edited_at: Time.current, updated_by: current_user) + note.check_for_spam(action: :update, user: current_user) unless only_commands end note.save |