Branch based on config to note sync for push suppression.

Minor if-let condition and scope reduction; formatting.

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk
2025-09-08 20:19:41 +00:00
parent 296018f0cc
commit 29c2c8a333
3 changed files with 34 additions and 35 deletions

View File

@@ -134,9 +134,10 @@ pub(crate) async fn sync_events_route(
.log_err()
.ok();
// Record that this user was actively syncing now (for push suppression
// heuristic)
services.presence.note_sync(sender_user).await;
// Record user as actively syncing for push suppression heuristic.
if services.config.suppress_push_when_active {
services.presence.note_sync(sender_user).await;
}
}
let mut since = body