[openstreetmap/openstreetmap-website] Note subscriptions db table (PR #5284)
Tom Hughes
notifications at github.com
Sun Oct 27 23:58:43 UTC 2024
@tomhughes 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
I don't believe it does - if `current_user` is defined then the `note_subscriptions` association will always exist. It might evaluate to an empty list but the association object will exist and can have methods invoked on it.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5284#discussion_r1818219516
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5284/review/2397670612 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20241027/6a4f9dd9/attachment.htm>
More information about the rails-dev
mailing list