diff --git a/src/main.rs b/src/main.rs index 8ae2e4e..f16afb1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -98,8 +98,8 @@ async fn main() -> Result<(), Box> { ) .into_stream() .try_filter(|message| { - let not_empty = !message.is_empty(); - async move { not_empty } + let criteria = !message.is_empty() && message.chars().count() <= 4096; + async move { criteria } }), ) .map_err(|e| Box::new(e) as Box);