implement channel limit option; increase minor version

This commit is contained in:
yggverse 2026-04-07 11:52:19 +03:00
parent 532f87311b
commit f52fe3a710
5 changed files with 9 additions and 3 deletions

View file

@ -43,7 +43,11 @@ async fn main() {
Ok(result) => {
let items = result.content.items;
debug!("received {:?} items to handle...", items.len());
for item in items {
for (i, item) in items.into_iter().enumerate() {
if channel.limit.is_some_and(|l| i > l) {
debug!("items limit for channel `{c}` reached at {i}; break.");
break;
}
match database.get(&item.id) {
Ok(id) => {
if id.is_some() {