message: Check whether user has permission to invite
diff: @@ -462,6 +462,16 @@ export default class RoomTile extends React.PureComponent<IProps, IState> {
  const isLowPriority = roomTags.includes(DefaultTagID.LowPriority);
  const lowPriorityLabel = _t("Low Priority");
  + const inRoom = this.props.room && this.props.room.getMyMembership() === "join";
  + const userId = MatrixClientPeg.get().getUserId();
  + let canInvite = inRoom;
  + 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
  {...contextMenuBelow(this.state.generalMenuPosition)}
  onFinished={this.onCloseGeneralMenu}
  @@ -481,11 +491,13 @@ export default class RoomTile extends React.PureComponent<IProps, IState> {
  label={lowPriorityLabel}
  iconClassName="mx_RoomTile_iconArrowDown"
  />
  + {canInvite ? (
  <IconizedContextMenuOption
  onClick={this.onInviteClick}
  label={_t("Invite to this room")}
  iconClassName="mx_RoomTile_iconInvite"
  />
  + ) : null}
  <IconizedContextMenuOption
  onClick={this.onOpenRoomSettings}
  label={_t("Settings")}
  