respect include_leave syncv3 filter

Signed-off-by: June Clementine Strawberry <june@3.dog>
This commit is contained in:
June Clementine Strawberry 2025-03-11 22:21:42 -04:00
parent 258b399de9
commit 6c29792b3d
No known key found for this signature in database

View file

@ -219,6 +219,7 @@ pub(crate) async fn build_sync_events(
sender_user,
next_batch,
full_state,
filter.room.include_leave,
&filter,
)
.map_ok(move |left_room| (room_id, left_room))
@ -412,6 +413,7 @@ async fn handle_left_room(
sender_user: &UserId,
next_batch: u64,
full_state: bool,
include_leave: bool,
filter: &FilterDefinition,
) -> Result<Option<LeftRoom>> {
let left_count = services
@ -540,6 +542,10 @@ async fn handle_left_room(
continue;
};
if !include_leave && pdu.sender == sender_user {
continue;
}
left_state_events.push(pdu.to_sync_state_event());
}
}