You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-12-10 07:22:27 +03:00
Make SonarCloud happier (#2850)
* Make SonarCloud happier * Revert one change due to lack of strict mode upstream * Fix typo
This commit is contained in:
committed by
GitHub
parent
52932f59ab
commit
6c543382e6
@@ -119,12 +119,10 @@ class OlmEncryption extends EncryptionAlgorithm {
|
||||
|
||||
const promises: Promise<void>[] = [];
|
||||
|
||||
for (let i = 0; i < users.length; ++i) {
|
||||
const userId = users[i];
|
||||
for (const userId of users) {
|
||||
const devices = this.crypto.getStoredDevicesForUser(userId) || [];
|
||||
|
||||
for (let j = 0; j < devices.length; ++j) {
|
||||
const deviceInfo = devices[j];
|
||||
for (const deviceInfo of devices) {
|
||||
const key = deviceInfo.getIdentityKey();
|
||||
if (key == this.olmDevice.deviceCurve25519Key) {
|
||||
// don't bother sending to ourself
|
||||
@@ -304,8 +302,7 @@ class OlmDecryption extends DecryptionAlgorithm {
|
||||
|
||||
// try each session in turn.
|
||||
const decryptionErrors: Record<string, string> = {};
|
||||
for (let i = 0; i < sessionIds.length; i++) {
|
||||
const sessionId = sessionIds[i];
|
||||
for (const sessionId of sessionIds) {
|
||||
try {
|
||||
const payload = await this.olmDevice.decryptMessage(
|
||||
theirDeviceIdentityKey, sessionId, message.type, message.body,
|
||||
|
||||
Reference in New Issue
Block a user