FIX: include topic link when inviting existing users to a topic/PM

FEATURE: allow staff to use topic_url for customizing email template
This commit is contained in:
Arpit Jalan 2019-10-16 12:26:36 +05:30
parent d5d8db7fa8
commit 600233482f
2 changed files with 20 additions and 7 deletions

View File

@ -566,7 +566,8 @@ class UserNotifications < ActionMailer::Base
topic_title: gsub_emoji_to_unicode(title), topic_title: gsub_emoji_to_unicode(title),
topic_excerpt: topic_excerpt, topic_excerpt: topic_excerpt,
site_title: SiteSetting.title, site_title: SiteSetting.title,
site_description: SiteSetting.site_description site_description: SiteSetting.site_description,
topic_url: post.topic.url
) )
html = PrettyText.cook(message, sanitize: false).html_safe html = PrettyText.cook(message, sanitize: false).html_safe

View File

@ -2593,7 +2593,7 @@ en:
The community flagged this post and now it is hidden. **Because this post has been hidden more than once, your post will now remain hidden until it is handled by a staff member.** The community flagged this post and now it is hidden. **Because this post has been hidden more than once, your post will now remain hidden until it is handled by a staff member.**
For additional guidance, please refer to our [community guidelines](%{base_url}/guidelines). For additional guidance, please refer to our [community guidelines](%{base_url}/guidelines).
flags_disagreed: flags_disagreed:
title: "Flagged post restored by staff" title: "Flagged post restored by staff"
subject_template: "Flagged post restored by staff" subject_template: "Flagged post restored by staff"
@ -2609,7 +2609,7 @@ en:
%{flagged_post_raw_content} %{flagged_post_raw_content}
``` ```
[/details] [/details]
flags_agreed_and_post_deleted: flags_agreed_and_post_deleted:
title: "Flagged post removed by staff" title: "Flagged post removed by staff"
subject_template: "Flagged post removed by staff" subject_template: "Flagged post removed by staff"
@ -3089,7 +3089,7 @@ en:
We have some new advice and recommendations for you based on your current site settings. We have some new advice and recommendations for you based on your current site settings.
[Visit your site dashboard](%{base_url}/admin) to see it. [Visit your site dashboard](%{base_url}/admin) to see it.
If nothing is visible on your dashboard, another staff member may have already acted on this advice. A list of staff actions can be found in your [Staff Action Logs](%{base_url}/admin/logs/staff_action_logs). If nothing is visible on your dashboard, another staff member may have already acted on this advice. A list of staff actions can be found in your [Staff Action Logs](%{base_url}/admin/logs/staff_action_logs).
new_user_of_the_month: new_user_of_the_month:
@ -3152,7 +3152,7 @@ en:
invited_group_to_private_message_body: | invited_group_to_private_message_body: |
%{username} invited @%{group_name} to a message %{username} invited @%{group_name} to a message
> **%{topic_title}** > **[%{topic_title}](%{topic_url})**
> >
> %{topic_excerpt} > %{topic_excerpt}
@ -3160,10 +3160,14 @@ en:
> %{site_title} -- %{site_description} > %{site_title} -- %{site_description}
To join the message, click the link below:
%{topic_url}
invited_to_private_message_body: | invited_to_private_message_body: |
%{username} invited you to a message %{username} invited you to a message
> **%{topic_title}** > **[%{topic_title}](%{topic_url})**
> >
> %{topic_excerpt} > %{topic_excerpt}
@ -3171,10 +3175,14 @@ en:
> %{site_title} -- %{site_description} > %{site_title} -- %{site_description}
To join the message, click the link below:
%{topic_url}
invited_to_topic_body: | invited_to_topic_body: |
%{username} invited you to a discussion %{username} invited you to a discussion
> **%{topic_title}** > **[%{topic_title}](%{topic_url})**
> >
> %{topic_excerpt} > %{topic_excerpt}
@ -3182,6 +3190,10 @@ en:
> %{site_title} -- %{site_description} > %{site_title} -- %{site_description}
To join the discussion, click the link below:
%{topic_url}
user_invited_to_private_message_pm_group: user_invited_to_private_message_pm_group:
title: "User Invited Group to PM" title: "User Invited Group to PM"
subject_template: "[%{email_prefix}] %{username} invited @%{group_name} to a message '%{topic_title}'" subject_template: "[%{email_prefix}] %{username} invited @%{group_name} to a message '%{topic_title}'"