You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-26 17:03:12 +03:00
nothing works anymore :((
This commit is contained in:
@@ -3886,26 +3886,26 @@ MatrixClient.prototype.setRoomMutePushRule = function(scope, roomId, mute) {
|
||||
}
|
||||
|
||||
if (deferred) {
|
||||
// Update this.pushRules when the operation completes
|
||||
const ruleRefreshDeferred = Promise.defer();
|
||||
deferred.done(function() {
|
||||
self.getPushRules().done(function(result) {
|
||||
self.pushRules = result;
|
||||
ruleRefreshDeferred.resolve();
|
||||
return new Promise((resolve, reject) => {
|
||||
// Update this.pushRules when the operation completes
|
||||
deferred.done(function() {
|
||||
self.getPushRules().done(function(result) {
|
||||
self.pushRules = result;
|
||||
resolve();
|
||||
}, function(err) {
|
||||
reject(err);
|
||||
});
|
||||
}, function(err) {
|
||||
ruleRefreshDeferred.reject(err);
|
||||
});
|
||||
}, 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.pushRules = result;
|
||||
ruleRefreshDeferred.reject(err);
|
||||
}, function(err2) {
|
||||
ruleRefreshDeferred.reject(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.pushRules = result;
|
||||
reject(err);
|
||||
}, function(err2) {
|
||||
reject(err);
|
||||
});
|
||||
});
|
||||
});
|
||||
return ruleRefreshDeferred.promise;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user