You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: invite_mailer.rb
    path of file: ./repos/discourse/app/mailers
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

class InviteMailer < ActionMailer::Base
  include Email::BuildEmailHelper

  layout "email_template"

  def send_invite(invi
    
  def send_invite(invite, invite_to_topic: false)
    # Find the first topic they were invited to
    first_topic = invite.topics.order(:created_at).first

    # get invitee name (based on site setting)
    inviter_name = invite.invited_by.username
    if SiteSetting.enable_names && invite.invited_by.name.present?
      inviter_name = "#{invite.invited_by.name} (#{invite.invited_by.username})"
    end