+ {this.state.error ? (
+
{window.i18n(this.state.error)}
+ ) : (
+ <>
+
+
{window.i18n('safetyNumber')}
+ {theirPubkey}
+
+
+
+ {this.renderSecurityNumber()}
+
+
+
+ {window.i18n('verifyHelp', theirName)}
+
+
+
+
+
+ {window.i18n(
+ isVerified ? 'isVerified' : 'isNotVerified',
+ theirName
+ )}
+
+
+ {verificationButton}
+
+ >
+ )}
+
+ );
+ }
+
+ public async onSafetyNumberChanged() {
+ const conversationModel = this.props.conversation;
+ await conversationModel.getProfiles();
+
+ const securityNumber = await this.generateSecurityNumber();
+ this.setState({ securityNumber });
+
+ window.confirmationDialog({
+ title: window.i18n('changedSinceVerifiedTitle'),
+ message: window.i18n('changedRightAfterVerify', [
+ conversationModel.attributes.profileName,
+ conversationModel.attributes.profileName,
+ ]),
+ hideCancel: true,
+ centeredText: true,
+ });
+ }
+
+ private async generateSecurityNumber(): Promise