[openstreetmap/openstreetmap-website] Diary entry comment subscriptions (#1309)
Tom Hughes
notifications at github.com
Tue Oct 4 09:54:56 UTC 2016
tomhughes commented on this pull request.
> @@ -57,10 +61,17 @@ def comment
@diary_comment = @entry.comments.build(comment_params)
@diary_comment.user = @user
if @diary_comment.save
- if @diary_comment.user != @entry.user
- Notifier.diary_comment_notification(@diary_comment).deliver_now
+
+ # Notify current subscribers of the new comment
+ @entry.subscribers.visible.each do |user|
+ if @user != user
Well the two are the same as `@diary_comment.user` has just been set from `@user` so it doesn't really matter too much.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/1309
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20161004/252c64e4/attachment.html>
More information about the rails-dev
mailing list