mirror of
https://github.com/wassname/talk.git
synced 2026-07-16 11:22:16 +08:00
remove a banned comment after it's confirmed as rejected
This commit is contained in:
@@ -42,6 +42,10 @@ export const postComment = graphql(POST_COMMENT, {
|
||||
updateQueries: {
|
||||
AssetQuery: (oldData, {mutationResult:{data:{createComment:{comment}}}}) => {
|
||||
|
||||
if (comment.status === 'REJECTED') {
|
||||
return oldData;
|
||||
}
|
||||
|
||||
if (oldData.asset.settings.moderation === 'PRE') {
|
||||
return oldData;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user