ruwuma/ruma-events/src/typing.rs
Jonas Platte f304c04d1d Add 'ruma-events/' from commit '00692d532e26f58d48ead9589dc823403c6e59a5'
git-subtree-dir: ruma-events
git-subtree-mainline: d59a616e2c363507a89c92f34aa67e86ee2cfb49
git-subtree-split: 00692d532e26f58d48ead9589dc823403c6e59a5
2020-06-10 22:07:24 +02:00

19 lines
582 B
Rust

//! Types for the *m.typing* event.
use ruma_events_macros::EphemeralRoomEventContent;
use ruma_identifiers::UserId;
use serde::{Deserialize, Serialize};
use crate::EphemeralRoomEvent;
/// Informs the client who is currently typing in a given room.
pub type TypingEvent = EphemeralRoomEvent<TypingEventContent>;
/// The payload for `TypingEvent`.
#[derive(Clone, Debug, Deserialize, Serialize, EphemeralRoomEventContent)]
#[ruma_event(type = "m.typing")]
pub struct TypingEventContent {
/// The list of user IDs typing in this room, if any.
pub user_ids: Vec<UserId>,
}