diff --git a/matrix_sdk/examples/command_bot.rs b/matrix_sdk/examples/command_bot.rs index 4f2d9fea..8c12fd5a 100644 --- a/matrix_sdk/examples/command_bot.rs +++ b/matrix_sdk/examples/command_bot.rs @@ -38,12 +38,8 @@ impl EventEmitter for CommandBot { }; if msg_body.contains("!party") { - let content = AnyMessageEventContent::RoomMessage(MessageEventContent::Text( - TextMessageEventContent { - body: "🎉🎊🥳 let's PARTY!! 🥳🎊🎉".to_string(), - formatted: None, - relates_to: None, - }, + let content = AnyMessageEventContent::RoomMessage(MessageEventContent::text_plain( + "🎉🎊🥳 let's PARTY!! 🥳🎊🎉", )); // we clone here to hold the lock for as little time as possible. let room_id = room.read().await.room_id.clone(); diff --git a/matrix_sdk/src/client.rs b/matrix_sdk/src/client.rs index 29f90ba1..7d465fd7 100644 --- a/matrix_sdk/src/client.rs +++ b/matrix_sdk/src/client.rs @@ -1945,10 +1945,7 @@ mod test { }, assign, directory::Filter, - events::{ - room::message::{MessageEventContent, TextMessageEventContent}, - AnyMessageEventContent, - }, + events::{room::message::MessageEventContent, AnyMessageEventContent}, identifiers::{event_id, room_id, user_id}, thirdparty, }; @@ -2490,13 +2487,8 @@ mod test { let room_id = room_id!("!testroom:example.org"); - let content = AnyMessageEventContent::RoomMessage(MessageEventContent::Text( - TextMessageEventContent { - body: "Hello world".to_owned(), - relates_to: None, - formatted: None, - }, - )); + let content = + AnyMessageEventContent::RoomMessage(MessageEventContent::text_plain("Hello world")); let txn_id = Uuid::new_v4(); let response = client .room_send(&room_id, content, Some(txn_id)) diff --git a/matrix_sdk_common/Cargo.toml b/matrix_sdk_common/Cargo.toml index 88cbc7af..d348a0d1 100644 --- a/matrix_sdk_common/Cargo.toml +++ b/matrix_sdk_common/Cargo.toml @@ -21,7 +21,7 @@ js_int = "0.1.9" [dependencies.ruma] version = "0.0.1" git = "https://github.com/ruma/ruma" -rev = "ee4280cea2f8d24c7f747fd57776fe72d50ce744" +rev = "48d1c9747561686e1c5627405780f6de01ee17b1" features = ["client-api", "unstable-pre-spec"] [target.'cfg(not(target_arch = "wasm32"))'.dependencies]