Convert m.fully_read to the new API.

This commit is contained in:
Jimmy Cuadra 2019-06-20 03:23:56 -07:00
parent 4be050b19a
commit 3c70dac634
2 changed files with 14 additions and 13 deletions

View File

@ -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,
}

View File

@ -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;