Convert m.fully_read to the new API.
This commit is contained in:
parent
4be050b19a
commit
3c70dac634
@ -1,22 +1,23 @@
|
|||||||
//! Types for the *m.fully_read* event.
|
//! Types for the *m.fully_read* event.
|
||||||
|
|
||||||
|
use ruma_events_macros::ruma_event;
|
||||||
use ruma_identifiers::{EventId, RoomId};
|
use ruma_identifiers::{EventId, RoomId};
|
||||||
use serde::{Deserialize, Serialize};
|
|
||||||
|
|
||||||
event! {
|
ruma_event! {
|
||||||
/// The current location of the user's read marker in a room.
|
/// 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
|
/// This event appears in the user's room account data for the room the marker is applicable
|
||||||
/// for.
|
/// for.
|
||||||
pub struct FullyReadEvent(FullyReadEventContent) {
|
FullyReadEvent {
|
||||||
/// The unique identifier for the room associated with this event.
|
kind: Event,
|
||||||
pub room_id: RoomId
|
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,
|
|
||||||
}
|
|
||||||
|
@ -125,7 +125,7 @@ mod macros;
|
|||||||
pub mod direct;
|
pub mod direct;
|
||||||
pub mod dummy;
|
pub mod dummy;
|
||||||
pub mod forwarded_room_key;
|
pub mod forwarded_room_key;
|
||||||
// pub mod fully_read;
|
pub mod fully_read;
|
||||||
pub mod ignored_user_list;
|
pub mod ignored_user_list;
|
||||||
// pub mod key;
|
// pub mod key;
|
||||||
pub mod presence;
|
pub mod presence;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user