From b47fc9b3e9b33b2ede103a5b7d24bf8611bc5b0a Mon Sep 17 00:00:00 2001 From: Mehak Nasir Date: Tue, 20 Dec 2022 20:02:59 +0500 Subject: [PATCH] fix: post edit reason will not be sent in case of global staff own post --- src/discussions/posts/post-editor/PostEditor.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/discussions/posts/post-editor/PostEditor.jsx b/src/discussions/posts/post-editor/PostEditor.jsx index 0ab48773..008f4679 100644 --- a/src/discussions/posts/post-editor/PostEditor.jsx +++ b/src/discussions/posts/post-editor/PostEditor.jsx @@ -138,7 +138,7 @@ function PostEditor({ follow: isEmpty(post?.following) ? true : post?.following, anonymous: allowAnonymous ? false : undefined, anonymousToPeers: allowAnonymousToPeers ? false : undefined, - editReasonCode: post?.lastEdit?.reasonCode || (userIsStaff ? 'violates-guidelines' : ''), + editReasonCode: post?.lastEdit?.reasonCode || (userIsStaff && canDisplayEditReason ? 'violates-guidelines' : undefined), cohort: post?.cohort || 'default', };