diff --git a/Cargo.toml b/Cargo.toml index 4d28cda5..5559f239 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,10 +11,8 @@ repository = "https://github.com/ruma/ruma-client-api" version = "0.1.0" [dependencies] -ruma-identifiers = "0.4.3" +ruma-events = "0.1.0" +ruma-identifiers = "0.5.0" serde = "0.8.19" serde_derive = "0.8.19" -serde_json = "0.8.3" - -[dependencies.ruma-events] -git = "https://github.com/ruma/ruma-events" +serde_json = "0.8.4" diff --git a/src/r0/context.rs b/src/r0/context.rs index baaa40a4..02c2c280 100644 --- a/src/r0/context.rs +++ b/src/r0/context.rs @@ -3,7 +3,8 @@ /// GET /_matrix/client/r0/rooms/:room_id/context/:event_id pub mod get_context { use ruma_identifiers::{EventId, RoomId}; - use ruma_events::{RoomEvent, StateEvent}; + use ruma_events::collections::only; + /// Details about this API endpoint. pub struct Endpoint; @@ -25,11 +26,11 @@ pub mod get_context { #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Response { pub end: String, - pub event: Box, - pub events_after: Vec>, - pub events_before: Vec>, + pub event: only::RoomEvent, + pub events_after: Vec, + pub events_before: Vec, pub start: String, - pub state: Vec>, + pub state: Vec, } impl ::Endpoint for Endpoint {