mirror of
https://github.com/vector-im/element-web.git
synced 2026-05-04 19:56:45 +02:00
Merge pull request #5330 from matrix-org/travis/fix-user-info
Don't show admin tooling if we're not in the room
This commit is contained in:
commit
d5e9d5306a
@ -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…
x
Reference in New Issue
Block a user