forked from jmug/stoatchat
fix: sub-validate message structs
This commit is contained in:
@@ -71,6 +71,10 @@ pub async fn req(
|
||||
new_embeds.clear();
|
||||
|
||||
for embed in embeds {
|
||||
embed
|
||||
.validate()
|
||||
.map_err(|error| Error::FailedValidation { error })?;
|
||||
|
||||
new_embeds.push(embed.clone().into_embed(db, message.id.clone()).await?);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user