mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-18 13:40:55 -04:00
feat(crypto-js): Rename RoomMessageRequest.content to .body.
This commit is contained in:
@@ -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,
|
||||
}
|
||||
|
||||
|
||||
@@ -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)],
|
||||
|
||||
Reference in New Issue
Block a user