You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-08-06 12:02:40 +03:00
Rip out some more bluebird
This commit is contained in:
@@ -202,7 +202,7 @@ describe("MatrixClient", function() {
|
||||
event_format: "client",
|
||||
});
|
||||
store.storeFilter(storeFilter);
|
||||
client.getFilter(userId, filterId, false).done(function(gotFilter) {
|
||||
client.getFilter(userId, filterId, false).then(function(gotFilter) {
|
||||
expect(gotFilter.getDefinition()).toEqual(httpFilterDefinition);
|
||||
done();
|
||||
});
|
||||
@@ -220,7 +220,7 @@ describe("MatrixClient", function() {
|
||||
httpBackend.when(
|
||||
"GET", "/user/" + encodeURIComponent(userId) + "/filter/" + filterId,
|
||||
).respond(200, httpFilterDefinition);
|
||||
client.getFilter(userId, filterId, true).done(function(gotFilter) {
|
||||
client.getFilter(userId, filterId, true).then(function(gotFilter) {
|
||||
expect(gotFilter.getDefinition()).toEqual(httpFilterDefinition);
|
||||
expect(store.getFilter(userId, filterId)).toBeTruthy();
|
||||
done();
|
||||
@@ -248,7 +248,7 @@ describe("MatrixClient", function() {
|
||||
filter_id: filterId,
|
||||
});
|
||||
|
||||
client.createFilter(filterDefinition).done(function(gotFilter) {
|
||||
client.createFilter(filterDefinition).then(function(gotFilter) {
|
||||
expect(gotFilter.getDefinition()).toEqual(filterDefinition);
|
||||
expect(store.getFilter(userId, filterId)).toEqual(gotFilter);
|
||||
done();
|
||||
@@ -295,7 +295,7 @@ describe("MatrixClient", function() {
|
||||
});
|
||||
}).respond(200, response);
|
||||
|
||||
httpBackend.flush().done(function() {
|
||||
httpBackend.flush().then(function() {
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
@@ -3224,7 +3224,7 @@ MatrixClient.prototype.scrollback = function(room, limit, callback) {
|
||||
room.oldState.paginationToken,
|
||||
limit,
|
||||
'b');
|
||||
}).done(function(res) {
|
||||
}).then(function(res) {
|
||||
const matrixEvents = utils.map(res.chunk, _PojoToMatrixEventMapper(self));
|
||||
if (res.state) {
|
||||
const stateEvents = utils.map(res.state, _PojoToMatrixEventMapper(self));
|
||||
|
@@ -776,7 +776,7 @@ class DeviceListUpdateSerialiser {
|
||||
}
|
||||
|
||||
return prom;
|
||||
}).done(() => {
|
||||
}).then(() => {
|
||||
logger.log('Completed key download for ' + downloadUsers);
|
||||
|
||||
this._downloadInProgress = false;
|
||||
|
@@ -360,7 +360,7 @@ SyncApi.prototype._peekPoll = function(peekRoom, token) {
|
||||
room_id: peekRoom.roomId,
|
||||
timeout: 30 * 1000,
|
||||
from: token,
|
||||
}, undefined, 50 * 1000).done(function(res) {
|
||||
}, undefined, 50 * 1000).then(function(res) {
|
||||
if (self._peekRoomId !== peekRoom.roomId) {
|
||||
debuglog("Stopped peeking in room %s", peekRoom.roomId);
|
||||
return;
|
||||
@@ -1417,7 +1417,7 @@ SyncApi.prototype._pokeKeepAlive = function(connDidFail) {
|
||||
prefix: '',
|
||||
localTimeoutMs: 15 * 1000,
|
||||
},
|
||||
).done(function() {
|
||||
).then(function() {
|
||||
success();
|
||||
}, function(err) {
|
||||
if (err.httpStatus == 400 || err.httpStatus == 404) {
|
||||
@@ -1541,7 +1541,7 @@ SyncApi.prototype._resolveInvites = function(room) {
|
||||
} else {
|
||||
promise = client.getProfileInfo(member.userId);
|
||||
}
|
||||
promise.done(function(info) {
|
||||
promise.then(function(info) {
|
||||
// slightly naughty by doctoring the invite event but this means all
|
||||
// the code paths remain the same between invite/join display name stuff
|
||||
// which is a worthy trade-off for some minor pollution.
|
||||
|
@@ -21,7 +21,7 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
const unhomoglyph = require('unhomoglyph');
|
||||
import Promise from 'bluebird';
|
||||
// import Promise from 'bluebird';
|
||||
|
||||
/**
|
||||
* Encode a dictionary of query parameters.
|
||||
|
Reference in New Issue
Block a user