You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-28 05:03:59 +03:00
use a separate object for each encrypted content
so that we don't duplicate the ciphertext for everyone
This commit is contained in:
@@ -460,15 +460,15 @@ MegolmEncryption.prototype._splitBlockedDevices = function(devicesByUser) {
|
|||||||
MegolmEncryption.prototype._encryptAndSendKeysToDevices = function(
|
MegolmEncryption.prototype._encryptAndSendKeysToDevices = function(
|
||||||
session, chainIndex, userDeviceMap, payload,
|
session, chainIndex, userDeviceMap, payload,
|
||||||
) {
|
) {
|
||||||
const encryptedContent = {
|
|
||||||
algorithm: olmlib.OLM_ALGORITHM,
|
|
||||||
sender_key: this._olmDevice.deviceCurve25519Key,
|
|
||||||
ciphertext: {},
|
|
||||||
};
|
|
||||||
const contentMap = {};
|
const contentMap = {};
|
||||||
|
|
||||||
const promises = [];
|
const promises = [];
|
||||||
for (let i = 0; i < userDeviceMap.length; i++) {
|
for (let i = 0; i < userDeviceMap.length; i++) {
|
||||||
|
const encryptedContent = {
|
||||||
|
algorithm: olmlib.OLM_ALGORITHM,
|
||||||
|
sender_key: this._olmDevice.deviceCurve25519Key,
|
||||||
|
ciphertext: {},
|
||||||
|
};
|
||||||
const val = userDeviceMap[i];
|
const val = userDeviceMap[i];
|
||||||
const userId = val.userId;
|
const userId = val.userId;
|
||||||
const deviceInfo = val.deviceInfo;
|
const deviceInfo = val.deviceInfo;
|
||||||
|
|||||||
Reference in New Issue
Block a user