From 79627af8d6fcdf44c89d726998268b2da5536236 Mon Sep 17 00:00:00 2001 From: Wyatt Johnson Date: Mon, 3 Aug 2020 15:21:09 +0000 Subject: [PATCH] fix: fixed incorrect connection access (#3064) --- .../admin/mutations/RejectCommentMutation.ts | 32 ++++++++++++++++--- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/src/core/client/admin/mutations/RejectCommentMutation.ts b/src/core/client/admin/mutations/RejectCommentMutation.ts index cf74b1dbb..db4c52639 100644 --- a/src/core/client/admin/mutations/RejectCommentMutation.ts +++ b/src/core/client/admin/mutations/RejectCommentMutation.ts @@ -100,10 +100,34 @@ const RejectCommentMutation = createMutation( proxy.setValue(true, "viewerDidModerate"); const connections = [ - getQueueConnection(store, "REPORTED", input.storyID), - getQueueConnection(store, "PENDING", input.storyID), - getQueueConnection(store, "UNMODERATED", input.storyID), - getQueueConnection(store, "APPROVED", input.storyID), + getQueueConnection( + store, + "REPORTED", + input.storyID, + input.siteID, + input.section + ), + getQueueConnection( + store, + "PENDING", + input.storyID, + input.siteID, + input.section + ), + getQueueConnection( + store, + "UNMODERATED", + input.storyID, + input.siteID, + input.section + ), + getQueueConnection( + store, + "APPROVED", + input.storyID, + input.siteID, + input.section + ), ].filter((c) => c); connections.forEach((con) => ConnectionHandler.deleteNode(con!, input.commentID)