feat(crypto-js): Rename RoomMessageRequest.content to .body.

This commit is contained in:
Ivan Enderlin
2023-01-18 13:31:26 +01:00
parent 7c01f8490f
commit 94fadf74b9
2 changed files with 5 additions and 5 deletions

View File

@@ -243,8 +243,8 @@ pub struct RoomMessageRequest {
#[wasm_bindgen(readonly)]
pub event_type: JsString,
/// A JSON-encoded string containing the message's content.
#[wasm_bindgen(readonly)]
/// A JSON-encoded string containing the message's body.
#[wasm_bindgen(readonly, js_name = "body")]
pub content: JsString,
}

View File

@@ -802,10 +802,10 @@ describe(OlmMachine.name, () => {
expect(outgoingVerificationRequest.room_id).toStrictEqual(room.toString());
expect(outgoingVerificationRequest.txn_id).toBeDefined();
expect(outgoingVerificationRequest.event_type).toStrictEqual('m.key.verification.start');
expect(outgoingVerificationRequest.content).toBeDefined();
expect(outgoingVerificationRequest.body).toBeDefined();
const content = JSON.parse(outgoingVerificationRequest.content);
expect(content).toMatchObject({
const body = JSON.parse(outgoingVerificationRequest.body);
expect(body).toMatchObject({
from_device: expect.any(String),
method: 'm.sas.v1',
key_agreement_protocols: [expect.any(String)],