mirror of
https://github.com/wassname/talk.git
synced 2026-07-05 06:14:58 +08:00
10 lines
282 B
JavaScript
10 lines
282 B
JavaScript
export function getCommentType(comment) {
|
|
let commentType = '';
|
|
if (comment.status === 'PREMOD') {
|
|
commentType = 'premod';
|
|
} else if (comment.actions && comment.actions.some((a) => a.__typename === 'FlagAction')) {
|
|
commentType = 'flagged';
|
|
}
|
|
return commentType;
|
|
}
|