[openstreetmap/openstreetmap-website] Note subscriptions db table (PR #5284)

Anton Khorev notifications at github.com
Sun Oct 27 23:20:10 UTC 2024


@AntonKhorev commented on this pull request.



> @@ -401,6 +401,8 @@ def add_comment(note, text, event, notify: true)
       note.comments.map(&:author).uniq.each do |user|
         UserMailer.note_comment_notification(comment, user).deliver_later if notify && user && user != current_user && user.visible?
       end
+
+      NoteSubscription.find_or_create_by(:note => note, :user => current_user) if current_user

That would require one more `&.` after `note__subscriptions`, so it depends on whether you think that chained `&.`s are simplifications.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5284#discussion_r1818207830
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/5284/review/2397654527 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20241027/3979753d/attachment-0001.htm>


More information about the rails-dev mailing list