mirror of
https://github.com/wassname/talk.git
synced 2026-07-03 07:45:34 +08:00
Make it appear in reported queue
This commit is contained in:
@@ -13,7 +13,7 @@ export default {
|
||||
},
|
||||
reported: {
|
||||
action_type: 'FLAG',
|
||||
statuses: ['NONE', 'PREMOD'],
|
||||
statuses: ['NONE', 'PREMOD', 'SYSTEM_WITHHELD'],
|
||||
icon: 'flag',
|
||||
name: t('modqueue.reported'),
|
||||
},
|
||||
|
||||
@@ -77,6 +77,14 @@ export default {
|
||||
title
|
||||
url
|
||||
}
|
||||
actions {
|
||||
__typename
|
||||
id
|
||||
... on FlagAction {
|
||||
reason
|
||||
message
|
||||
}
|
||||
}
|
||||
tags {
|
||||
tag {
|
||||
name
|
||||
|
||||
@@ -13,10 +13,10 @@ export const name = 'talk-plugin-commentbox';
|
||||
|
||||
// Given a newly posted comment's status, show a notification to the user
|
||||
// if needed
|
||||
export const notifyForNewCommentStatus = (notify, status) => {
|
||||
if (status === 'REJECTED') {
|
||||
export const notifyForNewCommentStatus = (notify, comment) => {
|
||||
if (comment.status === 'REJECTED') {
|
||||
notify('error', t('comment_box.comment_post_banned_word'));
|
||||
} else if (status === 'PREMOD' || status === 'SYSTEM_WITHHELD') {
|
||||
} else if (comment.status === 'PREMOD' || comment.status === 'SYSTEM_WITHHELD') {
|
||||
notify('success', t('comment_box.comment_post_notif_premod'));
|
||||
}
|
||||
};
|
||||
@@ -74,7 +74,7 @@ class CommentBox extends React.Component {
|
||||
// Execute postSubmit Hooks
|
||||
this.state.hooks.postSubmit.forEach((hook) => hook(data));
|
||||
|
||||
notifyForNewCommentStatus(notify, postedComment.status);
|
||||
notifyForNewCommentStatus(notify, postedComment);
|
||||
|
||||
if (commentPostedHandler) {
|
||||
commentPostedHandler();
|
||||
|
||||
@@ -282,8 +282,8 @@ const resolveNewCommentStatus = async (context, {asset_id, body, status}, wordli
|
||||
|
||||
// If the user is not a reliable commenter (passed the unreliability
|
||||
// threshold by having too many rejected comments) then we can change the
|
||||
// status of the comment to `PREMOD`, therefore pushing the user's comments
|
||||
// away from the public eye until a moderator can manage them. This of
|
||||
// status of the comment to `SYSTEM_WITHHELD`, therefore pushing the user's
|
||||
// comments away from the public eye until a moderator can manage them. This of
|
||||
// course can only be applied if the comment's current status is `NONE`,
|
||||
// we don't want to interfere if the comment was rejected.
|
||||
if (KarmaService.isReliable('comment', user.metadata.trust) === false) {
|
||||
|
||||
Reference in New Issue
Block a user