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

Replace yet more deferreds

This commit is contained in:
Michael Telatynski
2019-11-25 11:28:09 +00:00
parent 3901a381cc
commit bd8f8ef28d
3 changed files with 16 additions and 2 deletions

View File

@@ -3870,7 +3870,7 @@ MatrixClient.prototype.setRoomMutePushRule = function(scope, roomId, mute) {
} else if (!hasDontNotifyRule) {
// Remove the existing one before setting the mute push rule
// This is a workaround to SYN-590 (Push rule update fails)
deferred = Promise.defer();
deferred = utils.defer();
this.deletePushRule(scope, "room", roomPushRule.rule_id)
.done(function() {
self.addPushRule(scope, "room", roomId, {