diff --git a/matrix_sdk/examples/wasm_command_bot/src/lib.rs b/matrix_sdk/examples/wasm_command_bot/src/lib.rs index 35876e57..7da27ed9 100644 --- a/matrix_sdk/examples/wasm_command_bot/src/lib.rs +++ b/matrix_sdk/examples/wasm_command_bot/src/lib.rs @@ -2,7 +2,7 @@ use matrix_sdk::{ api::r0::sync::sync_events::Response as SyncResponse, events::{ room::message::{MessageEventContent, TextMessageEventContent}, - AnySyncMessageEvent, AnySyncRoomEvent, SyncMessageEvent, + AnyMessageEventContent, AnySyncMessageEvent, AnySyncRoomEvent, SyncMessageEvent, }, identifiers::RoomId, Client, ClientConfig, SyncSettings, @@ -32,15 +32,15 @@ impl WasmBot { console::log_1(&format!("Received message event {:?}", &msg_body).into()); if msg_body.starts_with("!party") { - let content = MessageEventContent::Text(TextMessageEventContent::plain( - "🎉🎊🥳 let's PARTY with wasm!! 🥳🎊🎉".to_string(), + let content = AnyMessageEventContent::RoomMessage(MessageEventContent::Text( + TextMessageEventContent::plain("🎉🎊🥳 let's PARTY with wasm!! 🥳🎊🎉".to_string()), )); self.0.room_send(&room_id, content, None).await.unwrap(); } } async fn on_sync_response(&self, response: SyncResponse) { - console::log_1(&format!("Synced").into()); + console::log_1(&"Synced".to_string().into()); for (room_id, room) in response.rooms.join { for event in room.timeline.events { diff --git a/matrix_sdk_base/src/client.rs b/matrix_sdk_base/src/client.rs index eadb5345..5f2e14ea 100644 --- a/matrix_sdk_base/src/client.rs +++ b/matrix_sdk_base/src/client.rs @@ -28,21 +28,21 @@ use matrix_sdk_common::{ api::r0 as api, events::{ ignored_user_list::IgnoredUserListEvent, push_rules::PushRulesEvent, - room::member::MemberEventContent, AnyBasicEvent, AnyMessageEventContent, - AnyStrippedStateEvent, AnySyncEphemeralRoomEvent, AnySyncMessageEvent, AnySyncRoomEvent, - AnySyncStateEvent, + room::member::MemberEventContent, AnyBasicEvent, AnyStrippedStateEvent, + AnySyncEphemeralRoomEvent, AnySyncMessageEvent, AnySyncRoomEvent, AnySyncStateEvent, }, identifiers::{RoomId, UserId}, locks::RwLock, push::Ruleset, - uuid::Uuid, Raw, }; #[cfg(feature = "encryption")] use matrix_sdk_common::{ api::r0::keys::claim_keys::Request as KeysClaimRequest, api::r0::to_device::send_event_to_device::IncomingRequest as OwnedToDeviceRequest, - events::room::encrypted::EncryptedEventContent, identifiers::DeviceId, + events::{room::encrypted::EncryptedEventContent, AnyMessageEventContent}, + identifiers::DeviceId, + uuid::Uuid, }; #[cfg(feature = "encryption")] use matrix_sdk_crypto::{