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,
|
sender_user,
|
||||||
next_batch,
|
next_batch,
|
||||||
full_state,
|
full_state,
|
||||||
|
filter.room.include_leave,
|
||||||
&filter,
|
&filter,
|
||||||
)
|
)
|
||||||
.map_ok(move |left_room| (room_id, left_room))
|
.map_ok(move |left_room| (room_id, left_room))
|
||||||
|
@ -412,6 +413,7 @@ async fn handle_left_room(
|
||||||
sender_user: &UserId,
|
sender_user: &UserId,
|
||||||
next_batch: u64,
|
next_batch: u64,
|
||||||
full_state: bool,
|
full_state: bool,
|
||||||
|
include_leave: bool,
|
||||||
filter: &FilterDefinition,
|
filter: &FilterDefinition,
|
||||||
) -> Result<Option<LeftRoom>> {
|
) -> Result<Option<LeftRoom>> {
|
||||||
let left_count = services
|
let left_count = services
|
||||||
|
@ -540,6 +542,10 @@ async fn handle_left_room(
|
||||||
continue;
|
continue;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if !include_leave && pdu.sender == sender_user {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
left_state_events.push(pdu.to_sync_state_event());
|
left_state_events.push(pdu.to_sync_state_event());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue