Dmitry Maksyoma
17a9335680
Duplicate notifications, when replying to and mentioning the same user (#8156)
* Refactor Mentions::CreateAll
* Update app/services/mentions/create_all.rb
Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
* Refactor for readability
* Try writing tests for duplicate notifications
* Skip Bullet warning, essentially for #current_user
* Fix duplicate notification, when mentioning comment author
* Improve spec readability
* Refactor specs and fix duplicate notificaation for moderator comments
* Refactor spec
* Remove obsolete code and refactor specs
* Remove obsolete spec
* Update spec/requests/comments_create_spec.rb
Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
* Get rid of #json_response
* Remove Bullet skipping
* Change #where -> #exists?
Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>