content already exists here

This commit is contained in:
Bruno Windels 2020-09-03 15:30:42 +02:00
parent 620fc0d210
commit 408ff3322d

View file

@ -67,8 +67,8 @@ export class Encryption {
await this._loadSessions(existingEncryptionTargets); await this._loadSessions(existingEncryptionTargets);
encryptionTargets = encryptionTargets.concat(existingEncryptionTargets); encryptionTargets = encryptionTargets.concat(existingEncryptionTargets);
const messages = encryptionTargets.map(target => { const messages = encryptionTargets.map(target => {
const content = this._encryptForDevice(type, content, target); const encryptedContent = this._encryptForDevice(type, content, target);
return new EncryptedMessage(content, target.device); return new EncryptedMessage(encryptedContent, target.device);
}); });
await this._storeSessions(encryptionTargets, timestamp); await this._storeSessions(encryptionTargets, timestamp);
return messages; return messages;