From c4265e76a331a0cbf49d0cbabd8e6408b2239940 Mon Sep 17 00:00:00 2001 From: Amaia Castro Date: Fri, 20 Jan 2017 18:46:33 +0100 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20send=20notifications=20when=20c?= =?UTF-8?q?ommenting=20on=20an=20annotation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit First level comments are considered different threads, so no need to notify the first commenter about other threads --- app/models/comment_notifier.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/models/comment_notifier.rb b/app/models/comment_notifier.rb index 3cceb5c15..68b350e6b 100644 --- a/app/models/comment_notifier.rb +++ b/app/models/comment_notifier.rb @@ -12,7 +12,9 @@ class CommentNotifier private def send_comment_email - Mailer.comment(@comment).deliver_later if email_on_comment? + unless @comment.commentable.is_a?(Legislation::Annotation) + Mailer.comment(@comment).deliver_later if email_on_comment? + end end def send_reply_email