diff --git a/src/r0/search/search_events.rs b/src/r0/search/search_events.rs index 58796f89..e9d67459 100644 --- a/src/r0/search/search_events.rs +++ b/src/r0/search/search_events.rs @@ -85,7 +85,7 @@ pub struct EventContext { } /// Context for search results, if requested. -#[derive(Clone, Debug, Deserialize, Serialize)] +#[derive(Clone, Debug, Deserialize)] pub struct EventContextResult { /// Pagination token for the end of the chunk. pub end: String, @@ -155,7 +155,7 @@ pub enum OrderBy { } /// Categories of events that can be searched for. -#[derive(Clone, Debug, Deserialize, Serialize)] +#[derive(Clone, Debug, Deserialize)] pub struct ResultCategories { /// Room event results. #[serde(skip_serializing_if = "Option::is_none")] @@ -163,7 +163,7 @@ pub struct ResultCategories { } /// Categories of events that can be searched for. -#[derive(Clone, Debug, Deserialize, Serialize)] +#[derive(Clone, Debug, Deserialize)] pub struct RoomEventResults { /// An approximate count of the total number of results found. pub count: UInt, @@ -198,7 +198,7 @@ pub struct ResultGroup { } /// A search result. -#[derive(Clone, Debug, Deserialize, Serialize)] +#[derive(Clone, Debug, Deserialize)] pub struct SearchResult { /// Context for result, if requested. #[serde(skip_serializing_if = "Option::is_none")] diff --git a/src/r0/send/send_message_event.rs b/src/r0/send/send_message_event.rs index 46b3043f..c97fd0a1 100644 --- a/src/r0/send/send_message_event.rs +++ b/src/r0/send/send_message_event.rs @@ -1,7 +1,7 @@ //! [PUT /_matrix/client/r0/rooms/{roomId}/send/{eventType}/{txnId}](https://matrix.org/docs/spec/client_server/r0.4.0.html#put-matrix-client-r0-rooms-roomid-send-eventtype-txnid) use ruma_api::ruma_api; -use ruma_events::{room::message::MessageEventContent, EventResult, EventType}; +use ruma_events::{room::message::MessageEventContent, EventType}; use ruma_identifiers::{EventId, RoomId}; ruma_api! { @@ -30,7 +30,7 @@ ruma_api! { pub txn_id: String, /// The event's content. #[ruma_api(body)] - pub data: EventResult, // FIXME + pub data: MessageEventContent, } response { diff --git a/src/r0/sync/sync_events.rs b/src/r0/sync/sync_events.rs index e054c42e..21845d9c 100644 --- a/src/r0/sync/sync_events.rs +++ b/src/r0/sync/sync_events.rs @@ -114,7 +114,7 @@ mod filter_def_serde { } /// Updates to rooms. -#[derive(Clone, Debug, Deserialize, Serialize)] +#[derive(Clone, Debug, Deserialize)] pub struct Rooms { /// The rooms that the user has left or been banned from. pub leave: HashMap, @@ -125,7 +125,7 @@ pub struct Rooms { } /// Historical updates to left rooms. -#[derive(Clone, Debug, Deserialize, Serialize)] +#[derive(Clone, Debug, Deserialize)] pub struct LeftRoom { /// The timeline of messages and state changes in the room up to the point when the user /// left. @@ -135,7 +135,7 @@ pub struct LeftRoom { } /// Updates to joined rooms. -#[derive(Clone, Debug, Deserialize, Serialize)] +#[derive(Clone, Debug, Deserialize)] pub struct JoinedRoom { /// Counts of unread notifications for this room. pub unread_notifications: UnreadNotificationsCount, @@ -164,7 +164,7 @@ pub struct UnreadNotificationsCount { } /// Events in the room. -#[derive(Clone, Debug, Deserialize, Serialize)] +#[derive(Clone, Debug, Deserialize)] pub struct Timeline { /// True if the number of events returned was limited by the `limit` on the filter. pub limited: bool, @@ -176,42 +176,42 @@ pub struct Timeline { } /// State events in the room. -#[derive(Clone, Debug, Deserialize, Serialize)] +#[derive(Clone, Debug, Deserialize)] pub struct State { /// A list of state events. pub events: Vec>, } /// The private data that this user has attached to this room. -#[derive(Clone, Debug, Deserialize, Serialize)] +#[derive(Clone, Debug, Deserialize)] pub struct AccountData { /// A list of events. pub events: Vec>, } /// Ephemeral events not recorded in the timeline or state of the room. -#[derive(Clone, Debug, Deserialize, Serialize)] +#[derive(Clone, Debug, Deserialize)] pub struct Ephemeral { /// A list of events. pub events: Vec>, } /// Updates to the rooms that the user has been invited to. -#[derive(Clone, Debug, Deserialize, Serialize)] +#[derive(Clone, Debug, Deserialize)] pub struct InvitedRoom { /// The state of a room that the user has been invited to. pub invite_state: InviteState, } /// The state of a room that the user has been invited to. -#[derive(Clone, Debug, Deserialize, Serialize)] +#[derive(Clone, Debug, Deserialize)] pub struct InviteState { /// A list of state events. pub events: Vec>, } /// Updates to the presence status of other users. -#[derive(Clone, Debug, Deserialize, Serialize)] +#[derive(Clone, Debug, Deserialize)] pub struct Presence { /// A list of events. pub events: Vec>,