ruwuma/src/room/create.rs
2019-02-06 20:12:30 +01:00

21 lines
661 B
Rust

//! Types for the *m.room.create* event.
use ruma_identifiers::UserId;
use serde::{Deserialize, Serialize};
state_event! {
/// This is the first event in a room and cannot be changed. It acts as the root of all other
/// events.
pub struct CreateEvent(CreateEventContent) {}
}
/// The payload of a `CreateEvent`.
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct CreateEventContent {
/// The `user_id` of the room creator. This is set by the homeserver.
pub creator: UserId,
/// Whether or not this room's data should be transferred to other homeservers.
#[serde(rename = "m.federate")]
pub federate: Option<bool>,
}