From f11caac05e1e5c7d441492d98274e7d05aedc893 Mon Sep 17 00:00:00 2001 From: Ginger Date: Thu, 13 Nov 2025 12:23:12 -0500 Subject: [PATCH] fix(sync/v3): Don't send dummy leaves on an initial sync --- src/api/client/sync/v3/left.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/api/client/sync/v3/left.rs b/src/api/client/sync/v3/left.rs index d6f6baa9..43e921ab 100644 --- a/src/api/client/sync/v3/left.rs +++ b/src/api/client/sync/v3/left.rs @@ -272,8 +272,13 @@ pub(super) async fn load_left_room( /* no leave event was actually sent in this room, but we still need to pretend like the user left it. this is usually because the room was banned by a server admin. - generate a fake leave event to placate the client. + if this is an incremental sync, generate a fake leave event to make the room vanish from clients. + otherwise we don't tell the client about this room at all. */ + if last_sync_end_count.is_none() { + return Ok(None); + } + trace!("syncing dummy leave event"); (TimelinePdus::default(), vec![create_dummy_leave_event( services,