mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 19:56:47 +03:00
Update src/components/views/rooms/RoomTile.tsx
This commit is contained in:
parent
70e0b77fc4
commit
495cbadb08
1 changed files with 1 additions and 9 deletions
|
@ -464,16 +464,8 @@ export default class RoomTile extends React.PureComponent<IProps, IState> {
|
||||||
const isLowPriority = roomTags.includes(DefaultTagID.LowPriority);
|
const isLowPriority = roomTags.includes(DefaultTagID.LowPriority);
|
||||||
const lowPriorityLabel = _t("Low Priority");
|
const lowPriorityLabel = _t("Low Priority");
|
||||||
|
|
||||||
const inRoom = this.props.room.getMyMembership() === "join";
|
|
||||||
const userId = MatrixClientPeg.get().getUserId();
|
const userId = MatrixClientPeg.get().getUserId();
|
||||||
let canInvite = inRoom;
|
const canInvite = this.props.room.canInvite(userId);
|
||||||
const powerLevels = this.props.room.currentState
|
|
||||||
.getStateEvents("m.room.power_levels", "")
|
|
||||||
?.getContent();
|
|
||||||
const me = this.props.room.getMember(userId);
|
|
||||||
if (powerLevels && me && powerLevels.invite > me.powerLevel) {
|
|
||||||
canInvite = false;
|
|
||||||
}
|
|
||||||
contextMenu = <IconizedContextMenu
|
contextMenu = <IconizedContextMenu
|
||||||
{...contextMenuBelow(this.state.generalMenuPosition)}
|
{...contextMenuBelow(this.state.generalMenuPosition)}
|
||||||
onFinished={this.onCloseGeneralMenu}
|
onFinished={this.onCloseGeneralMenu}
|
||||||
|
|
Loading…
Reference in a new issue