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

@@ -19,6 +19,7 @@ limitations under the License.
"use strict";
const PushProcessor = require('./pushprocessor');
import {sleep} from './utils';
/**
* This is an internal module. See {@link MatrixClient} for the public class.
@@ -3221,7 +3222,7 @@ MatrixClient.prototype.scrollback = function(room, limit, callback) {
const self = this;
// wait for a time before doing this request
// (which may be 0 in order not to special case the code paths)
Promise.delay(timeToWaitMs).then(function() {
sleep(timeToWaitMs).then(function() {
return self._createMessagesRequest(
room.roomId,
room.oldState.paginationToken,