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

Down to two test failures

This commit is contained in:
Michael Telatynski
2019-12-04 19:17:58 +00:00
parent 8a8109272a
commit 4a47867e49
13 changed files with 22 additions and 41 deletions

View File

@@ -3866,10 +3866,10 @@ MatrixClient.prototype.setRoomMutePushRule = function(scope, roomId, mute) {
// This is a workaround to SYN-590 (Push rule update fails)
deferred = utils.defer();
this.deletePushRule(scope, "room", roomPushRule.rule_id)
.done(function() {
.then(function() {
self.addPushRule(scope, "room", roomId, {
actions: ["dont_notify"],
}).done(function() {
}).then(function() {
deferred.resolve();
}, function(err) {
deferred.reject(err);
@@ -3885,8 +3885,8 @@ MatrixClient.prototype.setRoomMutePushRule = function(scope, roomId, mute) {
if (deferred) {
return new Promise((resolve, reject) => {
// Update this.pushRules when the operation completes
deferred.done(function() {
self.getPushRules().done(function(result) {
deferred.then(function() {
self.getPushRules().then(function(result) {
self.pushRules = result;
resolve();
}, function(err) {
@@ -3895,7 +3895,7 @@ MatrixClient.prototype.setRoomMutePushRule = function(scope, roomId, mute) {
}, function(err) {
// Update it even if the previous operation fails. This can help the
// app to recover when push settings has been modifed from another client
self.getPushRules().done(function(result) {
self.getPushRules().then(function(result) {
self.pushRules = result;
reject(err);
}, function(err2) {
@@ -4389,7 +4389,7 @@ MatrixClient.prototype.startClient = async function(opts) {
}
if (this._crypto) {
this._crypto.uploadDeviceKeys().done();
this._crypto.uploadDeviceKeys();
this._crypto.start();
}
@@ -5348,5 +5348,4 @@ module.exports.CRYPTO_ENABLED = CRYPTO_ENABLED;
* @property {Function} then promise.then(onFulfilled, onRejected, onProgress)
* @property {Function} catch promise.catch(onRejected)
* @property {Function} finally promise.finally(callback)
* @property {Function} done promise.done(onFulfilled, onRejected, onProgress)
*/