Don’t send notifications when commenting on an annotation

First level comments are considered different threads, so no need to notify the first commenter about other threads
This commit is contained in:
Amaia Castro
2017-01-20 18:46:33 +01:00
parent 289b8e044b
commit c4265e76a3

View File

@@ -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