fix: send message route not accepting null

This commit is contained in:
Zomatree
2023-06-04 18:46:49 +01:00
parent 3c834d06d4
commit a7a7e49e18
7 changed files with 31 additions and 26 deletions

View File

@@ -269,16 +269,15 @@ pub struct DataMessageSend {
#[validate(length(min = 0, max = 2000))]
pub content: Option<String>,
/// Attachments to include in message
#[serde(default)]
pub attachments: Vec<String>,
pub attachments: Option<Vec<String>>,
/// Messages to reply to
pub replies: Option<Vec<Reply>>,
/// Embeds to include in message
///
/// Text embed content contributes to the content length cap
#[serde(default)]
#[validate(length(min = 0, max = 10))]
pub embeds: Vec<SendableEmbed>,
#[validate]
pub embeds: Option<Vec<SendableEmbed>>,
/// Masquerade to apply to this message
#[validate]
pub masquerade: Option<Masquerade>,