1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2026-01-03 23:22:30 +03:00

Include keysProved and keysClaimed in the local echo for events we send.

This commit is contained in:
Mark Haines
2016-09-16 15:30:22 +01:00
parent 6e0b2de99f
commit c2a40572a5
2 changed files with 18 additions and 2 deletions

View File

@@ -797,10 +797,15 @@ Crypto.prototype.encryptEventIfNeeded = function(event, room) {
return null;
}
var myKeys = {
curve25519: this._olmDevice.deviceCurve25519Key,
ed25519: this._olmDevice.deviceEd25519Key,
};
return alg.encryptMessage(
room, event.getType(), event.getContent()
).then(function(encryptedContent) {
event.makeEncrypted("m.room.encrypted", encryptedContent);
event.makeEncrypted("m.room.encrypted", encryptedContent, myKeys);
});
};