JSON stringify payload, olm_encrypt does not do objects
This commit is contained in:
parent
8676909a26
commit
620fc0d210
1 changed files with 2 additions and 1 deletions
|
@ -107,7 +107,8 @@ export class Encryption {
|
||||||
|
|
||||||
_encryptForDevice(type, content, target) {
|
_encryptForDevice(type, content, target) {
|
||||||
const {session, device} = target;
|
const {session, device} = target;
|
||||||
const message = session.encrypt(this._buildPlainTextMessageForDevice(type, content, device));
|
const plaintext = JSON.stringify(this._buildPlainTextMessageForDevice(type, content, device));
|
||||||
|
const message = session.encrypt(plaintext);
|
||||||
const encryptedContent = {
|
const encryptedContent = {
|
||||||
algorithm: OLM_ALGORITHM,
|
algorithm: OLM_ALGORITHM,
|
||||||
sender_key: this._account.identityKeys.curve25519,
|
sender_key: this._account.identityKeys.curve25519,
|
||||||
|
|
Reference in a new issue