mirror of
https://github.com/wassname/talk.git
synced 2026-08-13 12:40:11 +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();
|
||||
|
||||
Reference in New Issue
Block a user