1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-26 17:03:12 +03:00

Stop using Bluebird.delay and Bluebird promise::delay

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski
2019-11-21 10:05:59 +00:00
parent 2ce106382a
commit 549b0f9313
4 changed files with 12 additions and 4 deletions

View File

@@ -31,6 +31,7 @@ import DeviceInfo from './deviceinfo';
import {CrossSigningInfo} from './CrossSigning';
import olmlib from './olmlib';
import IndexedDBCryptoStore from './store/indexeddb-crypto-store';
import {sleep} from '../utils';
/* State transition diagram for DeviceList._deviceTrackingStatus
@@ -763,7 +764,7 @@ class DeviceListUpdateSerialiser {
// this serves as an easy solution for now.
let prom = Promise.resolve();
for (const userId of downloadUsers) {
prom = prom.delay(5).then(() => {
prom = prom.then(sleep(5)).then(() => {
return this._processQueryResponseForUser(
userId, dk[userId], {
master: masterKeys[userId],