feat(messaging): cap total text content to 2k characters

This commit is contained in:
Paul Makles
2022-06-20 11:09:14 +01:00
parent 7fc4fb2df7
commit 4baab5d5d5
4 changed files with 33 additions and 0 deletions

View File

@@ -36,6 +36,8 @@ pub async fn req(
edit.validate()
.map_err(|error| Error::FailedValidation { error })?;
Message::validate_sum(&edit.content, &edit.embeds)?;
let mut message = msg.as_message(db).await?;
if message.channel != target {
return Err(Error::NotFound);