From 0e4ea9705079bab8c0611377170f36eb622e982d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Tue, 13 Jul 2021 13:31:24 +0200 Subject: [PATCH] Add defaultEncrypted prop MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- src/components/views/dialogs/CreateRoomDialog.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/views/dialogs/CreateRoomDialog.tsx b/src/components/views/dialogs/CreateRoomDialog.tsx index b5c0096771..c050e87bdf 100644 --- a/src/components/views/dialogs/CreateRoomDialog.tsx +++ b/src/components/views/dialogs/CreateRoomDialog.tsx @@ -37,6 +37,7 @@ interface IProps { defaultPublic?: boolean; defaultName?: string; parentSpace?: Room; + defaultEncrypted?: boolean; onFinished(proceed: boolean, opts?: IOpts): void; } @@ -63,7 +64,7 @@ export default class CreateRoomDialog extends React.Component { const config = SdkConfig.get(); this.state = { isPublic: this.props.defaultPublic || false, - isEncrypted: privateShouldBeEncrypted(), + isEncrypted: this.props.defaultEncrypted ?? privateShouldBeEncrypted(), name: this.props.defaultName || "", topic: "", alias: "",