ruwuma/src/typing.rs
2019-06-12 16:20:10 -07:00

20 lines
558 B
Rust

//! Types for the *m.typing* event.
use ruma_identifiers::{RoomId, UserId};
use serde::{Deserialize, Serialize};
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<UserId>,
}