You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-25 05:23:13 +03:00
lint
This commit is contained in:
committed by
Travis Ralston
parent
549656884b
commit
8c72fd104e
@@ -888,7 +888,9 @@ OlmDevice.prototype.addInboundGroupSession = async function(
|
|||||||
<= session.first_known_index()) {
|
<= session.first_known_index()) {
|
||||||
// existing session has lower index (i.e. can
|
// existing session has lower index (i.e. can
|
||||||
// decrypt more), so keep it
|
// decrypt more), so keep it
|
||||||
logger.log(`Keeping existing megolm session ${sessionId}`);
|
logger.log(
|
||||||
|
`Keeping existing megolm session ${sessionId}`,
|
||||||
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -200,7 +200,8 @@ MegolmEncryption.prototype._ensureOutboundSession = function(devicesInRoom) {
|
|||||||
if (!session) {
|
if (!session) {
|
||||||
logger.log(`Starting new megolm session for room ${self._roomId}`);
|
logger.log(`Starting new megolm session for room ${self._roomId}`);
|
||||||
session = await self._prepareNewSession();
|
session = await self._prepareNewSession();
|
||||||
logger.log(`Started new megolm session ${session.sessionId} for room ${self._roomId}`);
|
logger.log(`Started new megolm session ${session.sessionId} ` +
|
||||||
|
`for room ${self._roomId}`);
|
||||||
self._outboundSessions[session.sessionId] = session;
|
self._outboundSessions[session.sessionId] = session;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -441,13 +442,13 @@ MegolmEncryption.prototype.reshareKeyWithDevice = async function(
|
|||||||
) {
|
) {
|
||||||
const obSessionInfo = this._outboundSessions[sessionId];
|
const obSessionInfo = this._outboundSessions[sessionId];
|
||||||
if (!obSessionInfo) {
|
if (!obSessionInfo) {
|
||||||
logger.debug("megolm session ID " + sessionId + " not found: not re-sharing keys");
|
logger.debug(`megolm session ${sessionId} not found: not re-sharing keys`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// The chain index of the key we previously sent this device
|
// The chain index of the key we previously sent this device
|
||||||
if (obSessionInfo.sharedWithDevices[userId] === undefined) {
|
if (obSessionInfo.sharedWithDevices[userId] === undefined) {
|
||||||
logger.debug("megolm session ID " + sessionId + " never shared with user " + userId);
|
logger.debug(`megolm session ${sessionId} never shared with user ${userId}`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const sentChainIndex = obSessionInfo.sharedWithDevices[userId][device.deviceId];
|
const sentChainIndex = obSessionInfo.sharedWithDevices[userId][device.deviceId];
|
||||||
@@ -467,7 +468,7 @@ MegolmEncryption.prototype.reshareKeyWithDevice = async function(
|
|||||||
|
|
||||||
if (!key) {
|
if (!key) {
|
||||||
logger.warn(
|
logger.warn(
|
||||||
"No inbound session key found for megolm " + sessionId + ": not re-sharing keys",
|
`No inbound session key found for megolm ${sessionId}: not re-sharing keys`,
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -514,9 +515,8 @@ MegolmEncryption.prototype.reshareKeyWithDevice = async function(
|
|||||||
[device.deviceId]: encryptedContent,
|
[device.deviceId]: encryptedContent,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
logger.debug(
|
logger.debug(`Re-shared key for megolm session ${sessionId} ` +
|
||||||
`Re-shared key for megolm session ${sessionId} with ${userId}:${device.deviceId}`,
|
`with ${userId}:${device.deviceId}`);
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2277,7 +2277,8 @@ Crypto.prototype._getTrackedE2eRooms = function() {
|
|||||||
|
|
||||||
Crypto.prototype._onToDeviceEvent = function(event) {
|
Crypto.prototype._onToDeviceEvent = function(event) {
|
||||||
try {
|
try {
|
||||||
console.log(`received to_device ${event.getType()} from: ${event.getSender()} id: ${event.getId()}`);
|
console.log(`received to_device ${event.getType()} from: ` +
|
||||||
|
`${event.getSender()} id: ${event.getId()}`);
|
||||||
|
|
||||||
if (event.getType() == "m.room_key"
|
if (event.getType() == "m.room_key"
|
||||||
|| event.getType() == "m.forwarded_room_key") {
|
|| event.getType() == "m.forwarded_room_key") {
|
||||||
|
|||||||
Reference in New Issue
Block a user