def add_comment(note, text, event, notify: true)
attributes = { :visible => true, :event => event, :body => text }
def add_comment(note, text, event, notify: true)
attributes = { :visible => true, :event => event, :body => text }
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
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