Skip to content

A platform for community discussion. Free, open, simple.

FIX: include topic link when inviting existing users to a topic/PM FEATURE: allow staff to use topic_url for customizing email template

Arpit Jalan600233482f3b
diff --git a/app/mailers/user_notifications.rb b/app/mailers/user_notifications.rb
index 28e154f8de5..e74c94e8e27 100644
--- a/app/mailers/user_notifications.rb
+++ b/app/mailers/user_notifications.rb
@@ -566,7 +566,8 @@ class UserNotifications < ActionMailer::Base
topic_title: gsub_emoji_to_unicode(title),
topic_excerpt: topic_excerpt,
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
diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml
index bcefb89f451..1e72fbf09be 100644
--- a/config/locales/server.en.yml
+++ b/config/locales/server.en.yml
@@ -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.**
For additional guidance, please refer to our [community guidelines](%{base_url}/guidelines).
-
+
flags_disagreed:
title: "Flagged post restored by staff"
subject_template: "Flagged post restored by staff"
@@ -2609,7 +2609,7 @@ en:
%{flagged_post_raw_content}
```
[/details]
-
+
flags_agreed_and_post_deleted:
title: "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.
[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).
new_user_of_the_month:
@@ -3152,7 +3152,7 @@ en:
invited_group_to_private_message_body: |
%{username} invited @%{group_name} to a message
- > **%{topic_title}**
+ > **[%{topic_title}](%{topic_url})**
>
> %{topic_excerpt}
@@ -3160,10 +3160,14 @@ en:
> %{site_title} -- %{site_description}
+ To join the message, click the link below:
+
+ %{topic_url}
+
invited_to_private_message_body: |
%{username} invited you to a message
- > **%{topic_title}**
+ > **[%{topic_title}](%{topic_url})**
>
> %{topic_excerpt}
@@ -3171,10 +3175,14 @@ en:
> %{site_title} -- %{site_description}
+ To join the message, click the link below:
+
+ %{topic_url}
+
invited_to_topic_body: |
%{username} invited you to a discussion
- > **%{topic_title}**
+ > **[%{topic_title}](%{topic_url})**
>
> %{topic_excerpt}
@@ -3182,6 +3190,10 @@ en:
> %{site_title} -- %{site_description}
+ To join the discussion, click the link below:
+
+ %{topic_url}
+
user_invited_to_private_message_pm_group:
title: "User Invited Group to PM"
subject_template: "[%{email_prefix}] %{username} invited @%{group_name} to a message '%{topic_title}'"