<commit_before>class UserMailer < ActionMailer::Base
  default from: "<EMAIL>"

  def welcome_email(user)
    @user = user
    @url  = "ensemblify.com"
    mail(to: @user.email, subject: "#{@user.first_name}, welcome to Ensemblify!")
  end

  def invite_notification(user, group)
    @user = user
    @group = group
    @url = "ensemblify.com/groups/#{@group.id}"
    mail(to: @user.email, subject: "#{@user.first_name}, you've been invited to join #{@group.name}.")
  end

  def request_notification(admin, user, group)
    @admin = admin
    @user = user
    @group = group
    @group_url = "ensemblify.com/groups/#{@group.id}"
    @user_url = "ensemblify.com/users/#{@user.id}"
    mail(to: @admin.email, subject: "#{@admin.first_name}, #{@user.full_name} has requested to join #{@group.name}.")
  end

  def accept_invite(admin, user, group)
    @admin = admin
    @user = user
    @group = group
    @user_url = "ensemblify.com/users/#{@user.id}"
    @group_url = "ensemblify.com/groups/#{@group.id}"
    mail(to: @admin.email, subject: "#{@user.first_name} has accepted your invitation to join #{@group.name}.")
  end

  def accept_request(user, group)
    @user = user
    @group = group
    @url = "ensemblify.com/groups/#{@group.id}"
    mail(to: @user.email, subject: "#{@group.name} has accepted your request to join.")
  end

  def contact_user(sender_name, sender_email, recipient_name, recipient_email, content)<commit_msg>updates mailer links for users not logged in<commit_after>class UserMailer < ActionMailer::Base
  default from: "<EMAIL>"

  def welcome_email(user)
    @user = user
    @url  = "ensemblify.com"
    mail(to: @user.email, subject: "#{@user.first_name}, welcome to Ensemblify!")
  end

  def invite_notification(user, group)
    @user = user
    @group = group
    if logged_in?
      @url = "ensemblify.com/groups/#{@group.id}"
    else
      @url = "ensemblify.com"
    end
    mail(to: @user.email, subject: "#{@user.first_name}, you've been invited to join #{@group.name}.")
  end

  def request_notification(admin, user, group)
    @admin = admin
    @user = user
    @group = group
    if logged_in?
      @group_url = "ensemblify.com/groups/#{@group.id}"
      @user_url = "ensemblify.com/users/#{@user.id}"
    else
      @group_url = "ensemblify.com"
      @user_url = "ensemblify.com"
    end
    mail(to: @admin.email, subject: "#{@admin.first_name}, #{@user.full_name} has requested to join #{@group.name}.")
  end

  def accept_invite(admin, user, group)
    @admin = admin
    @user = user
    @group = group
    if logged_in?
      @user_url = "ensemblify.com/users/#{@user.id}"
      @group_url = "ensemblify.com/groups/#{@group.id}"
    else
      @user_url = "ensemblify.com"
      @group_url = "ensemblify.com"
    end
    mail(to: @admin.email, subject: "#{@user.first_name} has accepted your invitation to join #{@group.name}.")
  end

  def accept_request(user, group)
    @user = user
    @group = group
    if logged_in?
      @url = "ensemblify.com/groups/#{@group.id}"
    else
      @url = "ensemblify.com"
    end
    mail(to: @user.email, subject: "#{@group.name} has accepted your request to join.")
  end

  def contact_user(sender_name, sender_email, recipient_name, recipient_email, content)
{'fraction_non_alphanumeric': 0.15219392451672292, 'fraction_numerical': 0.0, 'mean_word_length': 3.3699731903485253, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, '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': '1848362', 'n_tokens_mistral': 1174, 'n_tokens_neox': 1158, 'n_words': 268}