Skip to content

Commit d5cebc3

Browse files
committed
feat(crypto-js): Rename RoomMessageRequest.content to .body.
1 parent 0ff2e6b commit d5cebc3

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/requests.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,8 @@ pub struct RoomMessageRequest {
243243
#[wasm_bindgen(readonly)]
244244
pub event_type: JsString,
245245

246-
/// A JSON-encoded string containing the message's content.
247-
#[wasm_bindgen(readonly)]
246+
/// A JSON-encoded string containing the message's body.
247+
#[wasm_bindgen(readonly, js_name = "body")]
248248
pub content: JsString,
249249
}
250250

tests/machine.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -802,10 +802,10 @@ describe(OlmMachine.name, () => {
802802
expect(outgoingVerificationRequest.room_id).toStrictEqual(room.toString());
803803
expect(outgoingVerificationRequest.txn_id).toBeDefined();
804804
expect(outgoingVerificationRequest.event_type).toStrictEqual('m.key.verification.start');
805-
expect(outgoingVerificationRequest.content).toBeDefined();
805+
expect(outgoingVerificationRequest.body).toBeDefined();
806806

807-
const content = JSON.parse(outgoingVerificationRequest.content);
808-
expect(content).toMatchObject({
807+
const body = JSON.parse(outgoingVerificationRequest.body);
808+
expect(body).toMatchObject({
809809
from_device: expect.any(String),
810810
method: 'm.sas.v1',
811811
key_agreement_protocols: [expect.any(String)],

0 commit comments

Comments
 (0)