diff --git a/src/VectorConferenceHandler.js b/src/VectorConferenceHandler.js index 807fbba0..de1aa233 100644 --- a/src/VectorConferenceHandler.js +++ b/src/VectorConferenceHandler.js @@ -57,7 +57,7 @@ ConferenceCall.prototype._joinConferenceUser = function() { } var member = groupRoom.getMember(this.confUserId); if (member && member.membership === "join") { - return q(); + return Promise.resolve(); } return this.client.invite(this.groupRoomId, this.confUserId); }; @@ -75,7 +75,7 @@ ConferenceCall.prototype._getConferenceUserRoom = function() { } } if (confRoom) { - return q(confRoom); + return Promise.resolve(confRoom); } return this.client.createRoom({ preset: "private_chat", diff --git a/src/components/structures/RoomDirectory.js b/src/components/structures/RoomDirectory.js index f487bbd1..ea3aa5a2 100644 --- a/src/components/structures/RoomDirectory.js +++ b/src/components/structures/RoomDirectory.js @@ -117,7 +117,7 @@ module.exports = React.createClass({ }, getMoreRooms: function() { - if (!MatrixClientPeg.get()) return q(); + if (!MatrixClientPeg.get()) return Promise.resolve(); const my_filter_string = this.state.filterString; const my_server = this.state.roomServer; @@ -266,7 +266,7 @@ module.exports = React.createClass({ }, onFillRequest: function(backwards) { - if (backwards || !this.nextBatch) return q(false); + if (backwards || !this.nextBatch) return Promise.resolve(false); return this.getMoreRooms(); }, diff --git a/src/vector/platform/ElectronPlatform.js b/src/vector/platform/ElectronPlatform.js index 809abccd..8e97f238 100644 --- a/src/vector/platform/ElectronPlatform.js +++ b/src/vector/platform/ElectronPlatform.js @@ -173,7 +173,7 @@ export default class ElectronPlatform extends VectorBasePlatform { } getAppVersion(): Promise { - return q(remote.app.getVersion()); + return Promise.resolve(remote.app.getVersion()); } startUpdateCheck() { @@ -201,7 +201,7 @@ export default class ElectronPlatform extends VectorBasePlatform { isElectron(): boolean { return true; } requestNotificationPermission(): Promise { - return q('granted'); + return Promise.resolve('granted'); } reload() { diff --git a/src/vector/platform/WebPlatform.js b/src/vector/platform/WebPlatform.js index 5946a57a..19187632 100644 --- a/src/vector/platform/WebPlatform.js +++ b/src/vector/platform/WebPlatform.js @@ -132,7 +132,7 @@ export default class WebPlatform extends VectorBasePlatform { getAppVersion(): Promise { if (this.runningVersion !== null) { - return q(this.runningVersion); + return Promise.resolve(this.runningVersion); } return this._getVersion(); } diff --git a/test/app-tests/joining.js b/test/app-tests/joining.js index 2f7c6070..6788b534 100644 --- a/test/app-tests/joining.js +++ b/test/app-tests/joining.js @@ -106,7 +106,7 @@ describe('joining a room', function () { .respond(200, {}); function awaitSync(attempts) { if (syncDone) { - return q(); + return Promise.resolve(); } if (!attempts) { throw new Error("Gave up waiting for /sync") diff --git a/test/app-tests/loading.js b/test/app-tests/loading.js index d517c05f..e3291b0b 100644 --- a/test/app-tests/loading.js +++ b/test/app-tests/loading.js @@ -683,7 +683,7 @@ function awaitSyncingSpinner(matrixChat, retryLimit, retryCount) { // state looks good, check the rendered output assertAtSyncingSpinner(matrixChat); - return q(); + return Promise.resolve(); } function assertAtSyncingSpinner(matrixChat) { @@ -721,5 +721,5 @@ function awaitRoomView(matrixChat, retryLimit, retryCount) { // state looks good, check the rendered output ReactTestUtils.findRenderedComponentWithType( matrixChat, sdk.getComponent('structures.RoomView')); - return q(); + return Promise.resolve(); }