Fixed panic from messages too long for telegram (prob not good)
This commit is contained in:
parent
af00fc5c4b
commit
9564aeddaa
|
@ -98,8 +98,8 @@ async fn main() -> Result<(), Box<dyn Error>> {
|
|||
)
|
||||
.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<dyn Error>);
|
||||
|
|
Loading…
Reference in New Issue