FIX: correct use of invitee vs inviter in email templates
This commit is contained in:
parent
d041377ccf
commit
0e0794dff9
|
@ -13,9 +13,9 @@ class InviteMailer < ActionMailer::Base
|
||||||
first_topic = invite.topics.order(:created_at).first
|
first_topic = invite.topics.order(:created_at).first
|
||||||
|
|
||||||
# get invitee name (based on site setting)
|
# get invitee name (based on site setting)
|
||||||
invitee_name = invite.invited_by.username
|
inviter_name = invite.invited_by.username
|
||||||
if SiteSetting.enable_names && invite.invited_by.name.present?
|
if SiteSetting.enable_names && invite.invited_by.name.present?
|
||||||
invitee_name = "#{invite.invited_by.name} (#{invite.invited_by.username})"
|
inviter_name = "#{invite.invited_by.name} (#{invite.invited_by.username})"
|
||||||
end
|
end
|
||||||
|
|
||||||
# If they were invited to a topic
|
# If they were invited to a topic
|
||||||
|
@ -39,7 +39,7 @@ class InviteMailer < ActionMailer::Base
|
||||||
|
|
||||||
build_email(invite.email,
|
build_email(invite.email,
|
||||||
template: template,
|
template: template,
|
||||||
invitee_name: invitee_name,
|
inviter_name: inviter_name,
|
||||||
site_domain_name: Discourse.current_hostname,
|
site_domain_name: Discourse.current_hostname,
|
||||||
invite_link: "#{Discourse.base_url}/invites/#{invite.invite_key}",
|
invite_link: "#{Discourse.base_url}/invites/#{invite.invite_key}",
|
||||||
topic_title: topic_title,
|
topic_title: topic_title,
|
||||||
|
@ -55,7 +55,7 @@ class InviteMailer < ActionMailer::Base
|
||||||
|
|
||||||
build_email(invite.email,
|
build_email(invite.email,
|
||||||
template: template,
|
template: template,
|
||||||
invitee_name: invitee_name,
|
inviter_name: inviter_name,
|
||||||
site_domain_name: Discourse.current_hostname,
|
site_domain_name: Discourse.current_hostname,
|
||||||
invite_link: "#{Discourse.base_url}/invites/#{invite.invite_key}",
|
invite_link: "#{Discourse.base_url}/invites/#{invite.invite_key}",
|
||||||
site_description: SiteSetting.site_description,
|
site_description: SiteSetting.site_description,
|
||||||
|
|
|
@ -1798,9 +1798,9 @@ en:
|
||||||
|
|
||||||
invite_mailer:
|
invite_mailer:
|
||||||
title: "Invite Mailer"
|
title: "Invite Mailer"
|
||||||
subject_template: "%{invitee_name} invited you to '%{topic_title}' on %{site_domain_name}"
|
subject_template: "%{inviter_name} invited you to '%{topic_title}' on %{site_domain_name}"
|
||||||
text_body_template: |
|
text_body_template: |
|
||||||
%{invitee_name} invited you to a discussion
|
%{inviter_name} invited you to a discussion
|
||||||
|
|
||||||
> **%{topic_title}**
|
> **%{topic_title}**
|
||||||
>
|
>
|
||||||
|
@ -1816,9 +1816,9 @@ en:
|
||||||
|
|
||||||
custom_invite_mailer:
|
custom_invite_mailer:
|
||||||
title: "Custom Invite Mailer"
|
title: "Custom Invite Mailer"
|
||||||
subject_template: "%{invitee_name} invited you to '%{topic_title}' on %{site_domain_name}"
|
subject_template: "%{inviter_name} invited you to '%{topic_title}' on %{site_domain_name}"
|
||||||
text_body_template: |
|
text_body_template: |
|
||||||
%{invitee_name} invited you to a discussion
|
%{inviter_name} invited you to a discussion
|
||||||
|
|
||||||
> **%{topic_title}**
|
> **%{topic_title}**
|
||||||
>
|
>
|
||||||
|
@ -1838,9 +1838,9 @@ en:
|
||||||
|
|
||||||
invite_forum_mailer:
|
invite_forum_mailer:
|
||||||
title: "Invite Forum Mailer"
|
title: "Invite Forum Mailer"
|
||||||
subject_template: "%{invitee_name} invited you to join %{site_domain_name}"
|
subject_template: "%{inviter_name} invited you to join %{site_domain_name}"
|
||||||
text_body_template: |
|
text_body_template: |
|
||||||
%{invitee_name} invited you to join
|
%{inviter_name} invited you to join
|
||||||
|
|
||||||
> **%{site_title}**
|
> **%{site_title}**
|
||||||
>
|
>
|
||||||
|
@ -1852,9 +1852,9 @@ en:
|
||||||
|
|
||||||
custom_invite_forum_mailer:
|
custom_invite_forum_mailer:
|
||||||
title: "Custom Invite Forum Mailer"
|
title: "Custom Invite Forum Mailer"
|
||||||
subject_template: "%{invitee_name} invited you to join %{site_domain_name}"
|
subject_template: "%{inviter_name} invited you to join %{site_domain_name}"
|
||||||
text_body_template: |
|
text_body_template: |
|
||||||
%{invitee_name} invited you to join
|
%{inviter_name} invited you to join
|
||||||
|
|
||||||
> **%{site_title}**
|
> **%{site_title}**
|
||||||
>
|
>
|
||||||
|
|
Loading…
Reference in New Issue