There is no need to load all comments only to count them. Lets just let the database do all the work. If there are no comments found, nothing will happen anyway. Also already filter the comments to only search for notifications for own comments. And add some tests :) |
||
|---|---|---|
| .. | ||
| aspects_membership_service.rb | ||
| block_service.rb | ||
| comment_service.rb | ||
| conversation_service.rb | ||
| diaspora_link_service.rb | ||
| import_service.rb | ||
| like_service.rb | ||
| migration_service.rb | ||
| notification_service.rb | ||
| photo_service.rb | ||
| poll_participation_service.rb | ||
| post_service.rb | ||
| reshare_service.rb | ||
| status_message_creation_service.rb | ||
| tag_following_service.rb | ||