From f813a752e7353426271a1581b9b60cf2c7433cad Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 24 Oct 2017 22:12:48 +0100 Subject: [PATCH] only show change power level option in MemberInfo if we can actually send m.room.power_level AND are lower PL than them Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/views/rooms/MemberInfo.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/views/rooms/MemberInfo.js b/src/components/views/rooms/MemberInfo.js index 2f8bd30a72..cf569bcc1b 100644 --- a/src/components/views/rooms/MemberInfo.js +++ b/src/components/views/rooms/MemberInfo.js @@ -545,7 +545,7 @@ module.exports = withMatrixClient(React.createClass({ can.ban = me.powerLevel >= powerLevels.ban; can.mute = me.powerLevel >= editPowerLevel; can.toggleMod = me.powerLevel > them.powerLevel && them.powerLevel >= levelToSend; - can.modifyLevel = me.powerLevel > them.powerLevel; + can.modifyLevel = me.powerLevel > them.powerLevel && me.powerLevel >= editPowerLevel; return can; }, @@ -814,7 +814,9 @@ module.exports = withMatrixClient(React.createClass({ { this.props.member.userId }
- { _t("Level:") } + { _t("Level:") } + +