remove a banned comment after it's confirmed as rejected

This commit is contained in:
Riley Davis
2017-03-06 13:53:56 -07:00
parent 77386fb21d
commit d9d086c61e
@@ -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;
}