Guard all isSpaceRoom calls behind the labs flag

This commit is contained in:
Michael Telatynski 2021-05-05 23:59:07 +01:00
parent 68210b1415
commit 9518e4d415
11 changed files with 34 additions and 23 deletions

View file

@ -1312,7 +1312,7 @@ export default class InviteDialog extends React.PureComponent<IInviteDialogProps
goButtonFn = this._startDm;
} else if (this.props.kind === KIND_INVITE) {
const room = MatrixClientPeg.get()?.getRoom(this.props.roomId);
const isSpace = room?.isSpaceRoom();
const isSpace = SettingsStore.getValue("feature_spaces") && room?.isSpaceRoom();
title = isSpace
? _t("Invite to %(spaceName)s", {
spaceName: room.name || _t("Unnamed Space"),