<commit_before># frozen_string_literal: true

class ReplyNotificationMailer < ApplicationMailer
  helper :cases
  helper :comment_threads

  def notify(notification)
    @notification = notification

    mail(to: @notification.reader.name_and_email,
         from: from_header,
         subject: subject_header) do |format|
      format.text
      format.html
    end
  end

  private<commit_msg>Prevents emails if the reader has turned off notifications<commit_after># frozen_string_literal: true

class ReplyNotificationMailer < ApplicationMailer
  helper :cases
  helper :comment_threads

  def notify(notification)
    @notification = notification
    reader = @notification.reader
    return unless reader.send_reply_notifications

    mail(to: reader.name_and_email,
         from: from_header,
         subject: subject_header) do |format|
      format.text
      format.html
    end
  end

  private
{'fraction_non_alphanumeric': 0.05953693495038589, 'fraction_numerical': 0.0, 'mean_word_length': 3.54, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2259048', 'n_tokens_mistral': 252, 'n_tokens_neox': 242, 'n_words': 66}