Skip to content

Commit e7104b7

Browse files
committed
feat: Add stateEncryption flag to SecurityRoomSettingsTab.
1 parent d86bea5 commit e7104b7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/components/views/settings/tabs/room/SecurityRoomSettingsTab.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ interface IState {
5555
history: HistoryVisibility;
5656
hasAliases: boolean;
5757
encrypted: boolean | null;
58+
stateEncrypted: boolean | null;
5859
showAdvancedSection: boolean;
5960
}
6061

@@ -80,6 +81,7 @@ export default class SecurityRoomSettingsTab extends React.Component<IProps, ISt
8081
),
8182
hasAliases: false, // async loaded in componentDidMount
8283
encrypted: null, // async loaded in componentDidMount
84+
stateEncrypted: null, // async loaded in componentDidMount
8385
showAdvancedSection: false,
8486
};
8587
}
@@ -90,6 +92,9 @@ export default class SecurityRoomSettingsTab extends React.Component<IProps, ISt
9092
this.setState({
9193
hasAliases: await this.hasAliases(),
9294
encrypted: Boolean(await this.context.getCrypto()?.isEncryptionEnabledInRoom(this.props.room.roomId)),
95+
stateEncrypted: Boolean(
96+
await this.context.getCrypto()?.isStateEncryptionEnabledInRoom(this.props.room.roomId),
97+
),
9398
});
9499
}
95100

0 commit comments

Comments
 (0)