Fix theoretical bug where VerificationRequestDialog uses an outdated request (#30870)

* Tests for VerificationRequestDialog

* Fix theoretical bug where VerificationRequestDialog uses an outdated request

We were passing on `this.props.verificationRequest` to `EncryptionPanel` but we
should be passing on the request in `this.state`. This would not cause a problem
in practice because the `EncryptionPanel` immediately overwrites the request if
you supply a `verificationRequestPromise`.
This commit is contained in:
Andy Balaam
2025-09-25 09:08:16 +01:00
committed by GitHub
parent 6a233b513a
commit 6bedb1525d
3 changed files with 669 additions and 1 deletions

View File

@@ -60,7 +60,7 @@ export default class VerificationRequestDialog extends React.Component<IProps, I
>
<EncryptionPanel
layout="dialog"
verificationRequest={this.props.verificationRequest}
verificationRequest={this.state.verificationRequest}
verificationRequestPromise={this.props.verificationRequestPromise}
onClose={this.props.onFinished}
member={member}