fix: post edit reason will not be sent in case of global staff own post

This commit is contained in:
Mehak Nasir
2022-12-20 20:02:59 +05:00
committed by Mehak Nasir
parent bb6e47ce70
commit b47fc9b3e9

View File

@@ -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',
};