You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-05 23:10:41 +03:00
Take the last request (ie. the most recent)
This commit is contained in:
@@ -52,10 +52,10 @@ export class SetupEncryptionStore extends EventEmitter {
|
|||||||
const cli = MatrixClientPeg.get();
|
const cli = MatrixClientPeg.get();
|
||||||
const requestsInProgress = cli.getVerificationRequestsToDeviceInProgress(cli.getUserId());
|
const requestsInProgress = cli.getVerificationRequestsToDeviceInProgress(cli.getUserId());
|
||||||
if (requestsInProgress.length) {
|
if (requestsInProgress.length) {
|
||||||
// If there are multiple, we take the first. Equally if the user sends another request from
|
// If there are multiple, we take the most recent. Equally if the user sends another request from
|
||||||
// another device after this screen has been shown, we'll switch to the new one, so this
|
// another device after this screen has been shown, we'll switch to the new one, so this
|
||||||
// generally doesn't support multiple requests.
|
// generally doesn't support multiple requests.
|
||||||
this._setActiveVerificationRequest(requestsInProgress[0]);
|
this._setActiveVerificationRequest(requestsInProgress[requestsInProgress.length - 1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.fetchKeyInfo();
|
this.fetchKeyInfo();
|
||||||
|
|||||||
Reference in New Issue
Block a user