feat: added moderation email notifications (#2525)

This commit is contained in:
Wyatt Johnson
2019-09-05 17:33:49 +00:00
committed by GitHub
parent e35978096f
commit 3c9ebcf1a1
10 changed files with 138 additions and 3 deletions
@@ -45,10 +45,24 @@ export type OnFeaturedTemplate = NotificationContext<
}
>;
export type OnCommentRejectedTemplate = NotificationContext<
"notification/on-comment-rejected",
{}
>;
export type OnCommentApprovedTemplate = NotificationContext<
"notification/on-comment-approved",
{
commentPermalink: string;
}
>;
export type DigestibleTemplate =
| OnReplyTemplate
| OnStaffReplyTemplate
| OnFeaturedTemplate;
| OnFeaturedTemplate
| OnCommentRejectedTemplate
| OnCommentApprovedTemplate;
type DigestTemplate = NotificationContext<
"notification/digest",
@@ -187,6 +201,8 @@ type Templates =
| OnReplyTemplate
| OnStaffReplyTemplate
| OnFeaturedTemplate
| DigestTemplate;
| DigestTemplate
| OnCommentRejectedTemplate
| OnCommentApprovedTemplate;
export { Templates as EmailTemplate };
@@ -0,0 +1 @@
{% extends "layouts/notification.html" %}
@@ -0,0 +1 @@
{% extends "layouts/notification.html" %}
@@ -0,0 +1,4 @@
<div data-l10n-id="email-template-notificationOnCommentApproved" data-l10n-args="{{ context | dump }}">
{{ context.organizationName }}<br /><br/>
Thank you for submitting your comment. Your comment has now been published: <a data-l10n-name="commentPermalink" href="{{ context.commentPermalink }}">View comment</a>
</div>
@@ -0,0 +1,4 @@
<div data-l10n-id="email-template-notificationOnCommentRejected" data-l10n-args="{{ context | dump }}">
{{ context.organizationName }}<br /><br/>
The language used in one of your comments did not comply with our community guidelines, and so the comment has been removed.
</div>