diff --git a/src/fully_read.rs b/src/fully_read.rs index 21233a76..ae629b10 100644 --- a/src/fully_read.rs +++ b/src/fully_read.rs @@ -1,22 +1,23 @@ //! Types for the *m.fully_read* event. +use ruma_events_macros::ruma_event; use ruma_identifiers::{EventId, RoomId}; -use serde::{Deserialize, Serialize}; -event! { +ruma_event! { /// The current location of the user's read marker in a room. /// /// This event appears in the user's room account data for the room the marker is applicable /// for. - pub struct FullyReadEvent(FullyReadEventContent) { - /// The unique identifier for the room associated with this event. - pub room_id: RoomId + FullyReadEvent { + kind: Event, + event_type: FullyRead, + fields: { + /// The unique identifier for the room associated with this event. + pub room_id: RoomId, + }, + content: { + /// The event the user's read marker is located at in the room. + pub event_id: EventId, + }, } } - -/// The payload of a `FullyReadEvent`. -#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] -pub struct FullyReadEventContent { - /// The event the user's read marker is located at in the room. - pub event_id: EventId, -} diff --git a/src/lib.rs b/src/lib.rs index a219ab43..e6260522 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -125,7 +125,7 @@ mod macros; pub mod direct; pub mod dummy; pub mod forwarded_room_key; -// pub mod fully_read; +pub mod fully_read; pub mod ignored_user_list; // pub mod key; pub mod presence;