mirror of
https://github.com/element-hq/element-web.git
synced 2024-12-01 11:03:18 +03:00
KeyRequestHandler: clear redundant users/devices on cancellations
... otherwise _processNextRequest will get confused
This commit is contained in:
parent
a3a262b150
commit
7a9784fd6e
1 changed files with 6 additions and 0 deletions
|
@ -88,6 +88,12 @@ export default class KeyRequestHandler {
|
|||
}
|
||||
console.log("Forgetting room key request");
|
||||
requests.splice(idx, 1);
|
||||
if (requests.length === 0) {
|
||||
delete this._pendingKeyRequests[userId][deviceId];
|
||||
if (Object.keys(this._pendingKeyRequests[userId]).length === 0) {
|
||||
delete this._pendingKeyRequests[userId];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_processNextRequest() {
|
||||
|
|
Loading…
Reference in a new issue