#7015 Allow moderators to perform Timeout as well.

This commit is contained in:
infinite-persistence 2021-09-03 23:53:49 +08:00
commit 95278f1da1
No known key found for this signature in database
GPG key ID: B9C3252EDC3D0AA0
2 changed files with 4 additions and 6 deletions

View file

@ -72,7 +72,7 @@ export default function ModalBlockChannel(props: Props) {
const [timeoutSec, setTimeoutSec] = React.useState(-1);
const isPersonalTheOnlyTab = !activeChannelIsModerator && !activeChannelIsAdmin;
const isTimeoutAvail = contentClaim && contentClaim.is_my_output;
const isTimeoutAvail = (contentClaim && contentClaim.is_my_output) || activeChannelIsModerator;
const blockButtonDisabled = blockType === BLOCK.TIMEOUT && timeoutSec < 1;
// **************************************************************************

View file

@ -324,11 +324,9 @@ const makeSelectFilteredComments = (comments: Array<Comment>, claimId?: string)
if (claimId) {
const claimIdIsMine = myClaims && myClaims.size > 0 && myClaims.has(claimId);
if (!claimIdIsMine) {
return !(
personalBlockList.includes(comment.channel_url) ||
adminBlockList.includes(comment.channel_url) ||
moderatorBlockList.includes(comment.channel_url)
);
if (personalBlockList.includes(comment.channel_url) || adminBlockList.includes(comment.channel_url)) {
return false;
}
}
}