ruwuma/src/typing.rs
2016-10-16 16:20:25 -07:00

19 lines
523 B
Rust

//! Types for the *m.typing* event.
use ruma_identifiers::{EventId, RoomId};
event! {
/// Informs the client of the list of users currently typing.
pub struct TypingEvent(TypingEventContent) {
/// The unique identifier for the room associated with this event.
pub room_id: RoomId
}
}
/// The payload of a `TypingEvent`.
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct TypingEventContent {
/// The list of user IDs typing in this room, if any.
pub user_ids: Vec<EventId>,
}