mirror of
https://github.com/girlbossceo/conduwuit.git
synced 2025-03-14 18:55:37 +00:00
respect include_leave syncv3 filter
Signed-off-by: June Clementine Strawberry <june@3.dog>
This commit is contained in:
parent
258b399de9
commit
6c29792b3d
1 changed files with 6 additions and 0 deletions
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue