ruwuma/src/sticker.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

26 lines
766 B
Rust

//! Types for the *m.sticker* event.
use ruma_events_macros::ruma_event;
use crate::room::ImageInfo;
ruma_event! {
/// A sticker message.
StickerEvent {
kind: RoomEvent,
event_type: "m.sticker",
content: {
/// A textual representation or associated description of the sticker image. This could
/// be the alt text of the original image, or a message to accompany and further
/// describe the sticker.
pub body: String,
/// Metadata about the image referred to in `url` including a thumbnail representation.
pub info: ImageInfo,
/// The URL to the sticker image. This must be a valid `mxc://` URI.
pub url: String,
},
}
}