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
@@ -8,3 +8,8 @@ export const PUBLISHED_STATUSES = [
GQLCOMMENT_STATUS.NONE,
GQLCOMMENT_STATUS.APPROVED,
];
export const MODERATOR_STATUSES = [
GQLCOMMENT_STATUS.PREMOD,
GQLCOMMENT_STATUS.SYSTEM_WITHHELD,
];
+5 -1
View File
@@ -1,7 +1,7 @@
import { GQLCOMMENT_STATUS } from "coral-server/graph/tenant/schema/__generated__/types";
import { Comment } from "./comment";
import { PUBLISHED_STATUSES } from "./constants";
import { MODERATOR_STATUSES, PUBLISHED_STATUSES } from "./constants";
import { Revision } from "./revision";
/**
@@ -25,6 +25,10 @@ export function hasPublishedStatus(comment: Pick<Comment, "status">): boolean {
return PUBLISHED_STATUSES.includes(comment.status);
}
export function hasModeratorStatus(comment: Pick<Comment, "status">): boolean {
return MODERATOR_STATUSES.includes(comment.status);
}
/**
* getLatestRevision will get the latest revision from a Comment.
*