Fix event types in get_context

This commit is contained in:
Jonas Platte 2020-06-04 12:08:08 +02:00
parent 6fcdeac896
commit 6214b3ac6e
No known key found for this signature in database
GPG Key ID: 7D261D771D915378

View File

@ -2,7 +2,7 @@
use js_int::UInt;
use ruma_api::ruma_api;
use ruma_events::{collections::only, EventJson};
use ruma_events::{collections::all, EventJson};
use ruma_identifiers::{EventId, RoomId};
use crate::r0::filter::RoomEventFilter;
@ -51,20 +51,20 @@ ruma_api! {
/// A list of room events that happened just before the requested event,
/// in reverse-chronological order.
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub events_before: Vec<EventJson<only::RoomEvent>>,
pub events_before: Vec<EventJson<all::RoomEvent>>,
/// Details of the requested event.
#[serde(skip_serializing_if = "Option::is_none")]
pub event: Option<EventJson<only::RoomEvent>>,
pub event: Option<EventJson<all::RoomEvent>>,
/// A list of room events that happened just after the requested event,
/// in chronological order.
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub events_after: Vec<EventJson<only::RoomEvent>>,
pub events_after: Vec<EventJson<all::RoomEvent>>,
/// The state of the room at the last event returned.
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub state: Vec<EventJson<only::StateEvent>>,
pub state: Vec<EventJson<all::StateEvent>>,
}
error: crate::Error