Add defaultEncrypted prop

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
Šimon Brandner 2021-07-13 13:31:24 +02:00
parent 90ecdac47b
commit 0e4ea97050
No known key found for this signature in database
GPG key ID: 9760693FDD98A790

View file

@ -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<IProps, IState> {
const config = SdkConfig.get();
this.state = {
isPublic: this.props.defaultPublic || false,
isEncrypted: privateShouldBeEncrypted(),
isEncrypted: this.props.defaultEncrypted ?? privateShouldBeEncrypted(),
name: this.props.defaultName || "",
topic: "",
alias: "",