use serde::{Deserialize, Serialize};
#[cfg_attr(feature = "export", derive(tsify::Tsify))]
#[cfg_attr(feature = "export", tsify(into_wasm_abi, from_wasm_abi))]
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ChatMessage {
pub channel_id: u32,
pub content: String,
pub is_action: bool,
pub message_id: u64,
pub sender_id: u32,
pub timestamp: String,
#[serde(rename = "type")]
pub message_type: String,
pub uuid: String,
pub sender: Option<Sender>,
}
#[cfg_attr(feature = "export", derive(tsify::Tsify))]
#[cfg_attr(feature = "export", tsify(into_wasm_abi, from_wasm_abi))]
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Sender {
pub id: u32,
pub username: String,
pub profile_colour: Option<String>,
pub avatar_url: String,
pub country_code: String,
pub is_active: bool,
pub is_bot: bool,
pub is_online: bool,
pub is_supporter: bool,
}