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
don't reject on error
because we ignore it anyways, and it makes an unrelated unit test fail
This commit is contained in:
@@ -202,7 +202,7 @@ module.exports.ensureOlmSessionsForDevices = async function(
|
|||||||
);
|
);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
for (const resolver of Object.values(resolveSession)) {
|
for (const resolver of Object.values(resolveSession)) {
|
||||||
resolver.reject(e);
|
resolver.resolve();
|
||||||
}
|
}
|
||||||
logger.log("failed to claim one-time keys", e, devicesWithoutSession);
|
logger.log("failed to claim one-time keys", e, devicesWithoutSession);
|
||||||
throw e;
|
throw e;
|
||||||
@@ -237,7 +237,7 @@ module.exports.ensureOlmSessionsForDevices = async function(
|
|||||||
const msg = "No one-time keys (alg=" + oneTimeKeyAlgorithm +
|
const msg = "No one-time keys (alg=" + oneTimeKeyAlgorithm +
|
||||||
") for device " + userId + ":" + deviceId;
|
") for device " + userId + ":" + deviceId;
|
||||||
logger.warn(msg);
|
logger.warn(msg);
|
||||||
resolveSession[key].reject(new Error(msg));
|
resolveSession[key].resolve();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -248,7 +248,7 @@ module.exports.ensureOlmSessionsForDevices = async function(
|
|||||||
resolveSession[key].resolve(sid);
|
resolveSession[key].resolve(sid);
|
||||||
result[userId][deviceId].sessionId = sid;
|
result[userId][deviceId].sessionId = sid;
|
||||||
}, (e) => {
|
}, (e) => {
|
||||||
resolveSession[key].reject(e);
|
resolveSession[key].resolve();
|
||||||
throw e;
|
throw e;
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user