Merge pull request #3487 from matrix-org/bwindels/redactpeers

Fix: allow mass redaction for members with same or larger power level
pull/21833/head
Bruno Windels 2019-09-27 14:56:24 +00:00 committed by GitHub
commit 5e960f50e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -685,7 +685,7 @@ module.exports = createReactClass({
mute: false,
modifyLevel: false,
modifyLevelMax: 0,
redactMessages: false,
redactMessages: me.powerLevel >= powerLevels.redact,
};
const canAffectUser = them.powerLevel < me.powerLevel || isMe;
@ -704,7 +704,6 @@ module.exports = createReactClass({
can.mute = me.powerLevel >= editPowerLevel;
can.modifyLevel = me.powerLevel >= editPowerLevel && (isMe || me.powerLevel > them.powerLevel);
can.modifyLevelMax = me.powerLevel;
can.redactMessages = me.powerLevel >= powerLevels.redact;
return can;
},