feat: added featured comment notifications (#2524)

This commit is contained in:
Wyatt Johnson
2019-09-05 17:10:03 +00:00
committed by GitHub
parent 04c56b3fb5
commit e35978096f
18 changed files with 228 additions and 58 deletions
@@ -36,7 +36,19 @@ export type OnStaffReplyTemplate = NotificationContext<
}
>;
export type DigestibleTemplate = OnReplyTemplate | OnStaffReplyTemplate;
export type OnFeaturedTemplate = NotificationContext<
"notification/on-featured",
{
storyTitle: string;
storyURL: string;
commentPermalink: string;
}
>;
export type DigestibleTemplate =
| OnReplyTemplate
| OnStaffReplyTemplate
| OnFeaturedTemplate;
type DigestTemplate = NotificationContext<
"notification/digest",
@@ -174,6 +186,7 @@ type Templates =
| AccountDeletionCompleted
| OnReplyTemplate
| OnStaffReplyTemplate
| OnFeaturedTemplate
| DigestTemplate;
export { Templates as EmailTemplate };
@@ -0,0 +1 @@
{% extends "layouts/notification.html" %}
@@ -0,0 +1,4 @@
<div data-l10n-id="email-template-notificationOnFeatured" data-l10n-args="{{ context | dump }}">
{{ context.organizationName }} - <a data-l10n-name="storyLink" href="{{ context.storyURL }}">{{ context.storyTitle }}</a><br /><br/>
A member of our team has selected this comment to be featured for other readers: <a data-l10n-name="commentPermalink" href="{{ context.commentPermalink }}">View comment</a>
</div>