1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-28 05:03:59 +03:00

fix test, lint

This commit is contained in:
Hubert Chathi
2021-03-10 20:04:34 -05:00
parent ceb162eb01
commit 0bfcb5071d

View File

@@ -38,8 +38,8 @@ import {WITHHELD_MESSAGES} from '../OlmDevice';
// determine whether the key can be shared with invitees // determine whether the key can be shared with invitees
function isRoomKeyShareable(room) { function isRoomKeyShareable(room) {
const visibilityEvent = room.currentState const visibilityEvent = room.currentState &&
.getStateEvents("m.room.history_visibility", ""); room.currentState.getStateEvents("m.room.history_visibility", "");
// NOTE: if the room visibility is unset, it would normally default to // NOTE: if the room visibility is unset, it would normally default to
// "world_readable". // "world_readable".
// (https://spec.matrix.org/unstable/client-server-api/#server-behaviour-5) // (https://spec.matrix.org/unstable/client-server-api/#server-behaviour-5)
@@ -55,6 +55,8 @@ function isRoomKeyShareable(room) {
* @constructor * @constructor
* *
* @param {string} sessionId * @param {string} sessionId
* @param {boolean} shareable whether the session can be freely shared with other
* group members, according to the room history visibility settings
* *
* @property {string} sessionId * @property {string} sessionId
* @property {Number} useCount number of times this session has been used * @property {Number} useCount number of times this session has been used
@@ -698,14 +700,14 @@ MegolmEncryption.prototype.reshareKeyWithDevice = async function(
const payload = { const payload = {
type: "m.forwarded_room_key", type: "m.forwarded_room_key",
content: { content: {
algorithm: olmlib.MEGOLM_ALGORITHM, "algorithm": olmlib.MEGOLM_ALGORITHM,
room_id: this._roomId, "room_id": this._roomId,
session_id: sessionId, "session_id": sessionId,
session_key: key.key, "session_key": key.key,
chain_index: key.chain_index, "chain_index": key.chain_index,
sender_key: senderKey, "sender_key": senderKey,
sender_claimed_ed25519_key: key.sender_claimed_ed25519_key, "sender_claimed_ed25519_key": key.sender_claimed_ed25519_key,
forwarding_curve25519_key_chain: key.forwarding_curve25519_key_chain, "forwarding_curve25519_key_chain": key.forwarding_curve25519_key_chain,
"io.element.unstable.shareable": key.shareable || false, "io.element.unstable.shareable": key.shareable || false,
}, },
}; };