From 106bba761e369e906178e79362927857689682e1 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Mon, 19 Jan 2026 06:38:08 +0000 Subject: [PATCH] Use bounded condition for syncv3 notification count; asymmetric reset condition. (#261) Signed-off-by: Jason Volk --- src/api/client/sync/v3.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/client/sync/v3.rs b/src/api/client/sync/v3.rs index aec624ec..157fb8cd 100644 --- a/src/api/client/sync/v3.rs +++ b/src/api/client/sync/v3.rs @@ -966,11 +966,11 @@ async fn load_joined_room( let send_notification_counts = last_notification_read .flatten() - .is_none_or(|last_count| last_count.gt(&since)); + .is_none_or(|last_count| last_count > since && last_count <= next_batch); let send_notification_resets = last_notification_read .flatten() - .is_some_and(|last_count| last_count.gt(&since)); + .is_some_and(|last_count| last_count > since); let send_notification_count_filter = |count: &UInt| *count != uint!(0) || send_notification_resets;