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_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

View File

@ -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}'"