Reduce usage of ruma_events::collections::only
in the case of get_message_events this intentionally changes a type
This commit is contained in:
parent
26d7e2f04d
commit
61bdd1ba96
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
use js_int::UInt;
|
use js_int::UInt;
|
||||||
use ruma_api::ruma_api;
|
use ruma_api::ruma_api;
|
||||||
use ruma_events::{collections::only, EventResult};
|
use ruma_events::{collections::all::RoomEvent, EventResult};
|
||||||
use ruma_identifiers::RoomId;
|
use ruma_identifiers::RoomId;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
@ -56,8 +56,8 @@ ruma_api! {
|
|||||||
/// The token the pagination starts from.
|
/// The token the pagination starts from.
|
||||||
pub start: String,
|
pub start: String,
|
||||||
/// A list of room events.
|
/// A list of room events.
|
||||||
#[wrap_incoming(only::RoomEvent with EventResult)]
|
#[wrap_incoming(RoomEvent with EventResult)]
|
||||||
pub chunk: Vec<only::RoomEvent>,
|
pub chunk: Vec<RoomEvent>,
|
||||||
/// The token the pagination ends at.
|
/// The token the pagination ends at.
|
||||||
pub end: String,
|
pub end: String,
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//! [GET /_matrix/client/r0/rooms/{roomId}/state](https://matrix.org/docs/spec/client_server/r0.4.0.html#get-matrix-client-r0-rooms-roomid-state)
|
//! [GET /_matrix/client/r0/rooms/{roomId}/state](https://matrix.org/docs/spec/client_server/r0.4.0.html#get-matrix-client-r0-rooms-roomid-state)
|
||||||
|
|
||||||
use ruma_api::ruma_api;
|
use ruma_api::ruma_api;
|
||||||
use ruma_events::{collections::only, EventResult};
|
use ruma_events::{collections::all::StateEvent, EventResult};
|
||||||
use ruma_identifiers::RoomId;
|
use ruma_identifiers::RoomId;
|
||||||
|
|
||||||
ruma_api! {
|
ruma_api! {
|
||||||
@ -25,7 +25,7 @@ ruma_api! {
|
|||||||
/// list of events. If the user has left the room then this will be the state of the
|
/// list of events. If the user has left the room then this will be the state of the
|
||||||
/// room when they left as a list of events.
|
/// room when they left as a list of events.
|
||||||
#[ruma_api(body)]
|
#[ruma_api(body)]
|
||||||
#[wrap_incoming(only::StateEvent with EventResult)]
|
#[wrap_incoming(StateEvent with EventResult)]
|
||||||
pub room_state: Vec<only::StateEvent>,
|
pub room_state: Vec<StateEvent>,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user