From d9d086c61ec3bfa235238f7c56f18e7fb63e09f1 Mon Sep 17 00:00:00 2001 From: Riley Davis Date: Mon, 6 Mar 2017 13:53:56 -0700 Subject: [PATCH] remove a banned comment after it's confirmed as rejected --- client/coral-framework/graphql/mutations/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/coral-framework/graphql/mutations/index.js b/client/coral-framework/graphql/mutations/index.js index a874f8f0c..40469a18e 100644 --- a/client/coral-framework/graphql/mutations/index.js +++ b/client/coral-framework/graphql/mutations/index.js @@ -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; }