ruwuma/src/room/redaction.rs
Ragotzy.devin 8ea971b082
Derive Serialize in ruma_events!, use json EventType string for event_type field
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
2020-03-24 14:25:50 +01:00

22 lines
557 B
Rust

//! Types for the *m.room.redaction* event.
use ruma_events_macros::ruma_event;
use ruma_identifiers::EventId;
ruma_event! {
/// A redaction of an event.
RedactionEvent {
kind: RoomEvent,
event_type: "m.room.redaction",
fields: {
/// The ID of the event that was redacted.
pub redacts: EventId,
},
content: {
/// The reason for the redaction, if any.
#[serde(skip_serializing_if = "Option::is_none")]
pub reason: Option<String>,
}
}
}