rive_models/
emoji.rs

1use serde::{Deserialize, Serialize};
2
3/// Information about what owns this emoji
4#[derive(Serialize, Deserialize, Debug, Clone)]
5#[serde(tag = "type")]
6pub enum EmojiParent {
7    Server { id: String },
8    Detached,
9}
10
11/// Representation of an Emoji on Revolt
12#[derive(Deserialize, Debug, Clone)]
13pub struct Emoji {
14    /// Unique Id
15    #[serde(rename = "_id")]
16    pub id: String,
17    /// What owns this emoji
18    pub parent: EmojiParent,
19    /// Uploader user id
20    pub creator_id: String,
21    /// Emoji name
22    pub name: String,
23    /// Whether the emoji is animated
24    #[serde(default)]
25    pub animated: bool,
26    /// Whether the emoji is marked as nsfw
27    #[serde(default)]
28    pub nsfw: bool,
29}