mirror of
https://github.com/wassname/talk.git
synced 2026-08-16 11:29:31 +08:00
feat: added moderation email notifications (#2525)
This commit is contained in:
@@ -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,
|
||||
];
|
||||
|
||||
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user