diff --git a/Cargo.toml b/Cargo.toml index 6fd59e5d..1c5972c2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,22 +13,22 @@ repository = "https://github.com/ruma/ruma-client" version = "0.2.0" [dependencies] -futures-preview = "0.3.0-alpha.19" -http = "0.1.18" -hyper = { version = "0.13.0-alpha.4", features = ["unstable-stream"] } -hyper-tls = { version = "0.4.0-alpha.4", optional = true } -ruma-api = { git = "https://github.com/ruma/ruma-api", branch = "serverless" } -ruma-client-api = { git = "https://github.com/ruma/ruma-client-api", branch = "event-result" } -ruma-events = { git = "https://github.com/ruma/ruma-events", branch = "event-result-2" } +futures-preview = "=0.3.0-alpha.19" +http = "=0.1.18" +hyper = { version = "=0.13.0-alpha.4", features = ["unstable-stream"] } +hyper-tls = { version = "=0.4.0-alpha.4", optional = true } +ruma-api = "0.11.0" +ruma-client-api = "0.4.0" +ruma-events = "0.15.1" ruma-identifiers = "0.14.0" native-tls = { version = "0.2.3", optional = true } -serde = { version = "1.0.101", features = ["derive"] } +serde = { version = "1.0.102", features = ["derive"] } serde_json = "1.0.41" serde_urlencoded = "0.6.1" url = "2.1.0" [dev-dependencies] -tokio = "0.2.0-alpha.6" +tokio = "=0.2.0-alpha.6" [features] default = ["tls"] diff --git a/examples/hello_world.rs b/examples/hello_world.rs index 9019c4c4..6b7e8140 100644 --- a/examples/hello_world.rs +++ b/examples/hello_world.rs @@ -4,7 +4,7 @@ use ruma_client::{ self, api::r0, events::{ - room::message::{MessageEventContent, MessageType, TextMessageEventContent}, + room::message::{MessageEventContent, TextMessageEventContent}, EventType, }, identifiers::RoomAliasId, @@ -37,7 +37,6 @@ async fn hello_world(homeserver_url: Url, room: String) -> Result<(), ruma_clien event_type: EventType::RoomMessage, txn_id: "1".to_owned(), data: MessageEventContent::Text(TextMessageEventContent { - msgtype: MessageType::Text, body: "Hello World!".to_owned(), format: None, formatted_body: None, diff --git a/examples/message_log.rs b/examples/message_log.rs index 3a55cb53..9b70ef07 100644 --- a/examples/message_log.rs +++ b/examples/message_log.rs @@ -26,7 +26,12 @@ async fn log_messages( while let Some(res) = sync_stream.try_next().await? { // Only look at rooms the user hasn't left yet for (room_id, room) in res.rooms.join { - for event in room.timeline.events { + for event in room + .timeline + .events + .into_iter() + .flat_map(|r| r.into_result()) + { // Filter out the text messages if let RoomEvent::RoomMessage(MessageEvent { content: