mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-17 14:05:04 +08:00
Don't show admin tooling if we're not in the room
Fixes https://github.com/vector-im/element-web/issues/15480
This commit is contained in:
parent
3a0833e8a4
commit
5f3f7b5263
@ -801,6 +801,11 @@ const RoomAdminToolsContainer: React.FC<IBaseRoomProps> = ({
|
||||
} = powerLevels;
|
||||
|
||||
const me = room.getMember(cli.getUserId());
|
||||
if (!me) {
|
||||
// we aren't in the room, so return no admin tooling
|
||||
return <div />;
|
||||
}
|
||||
|
||||
const isMe = me.userId === member.userId;
|
||||
const canAffectUser = member.powerLevel < me.powerLevel || isMe;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user