mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-19 16:51:24 +01:00
implement per-event state filtering for invited rooms on /sync
This one is a little weird, because the stripped invite state events are not deserialized.
This commit is contained in:
parent
4c9728cbad
commit
b85110a292
2 changed files with 47 additions and 3 deletions
|
|
@ -262,9 +262,14 @@ pub(crate) async fn sync_events_route(
|
|||
continue;
|
||||
}
|
||||
|
||||
let state_events = invite_state_events
|
||||
.into_iter()
|
||||
.filter(|event| compiled_filter.room.state.raw_event_allowed(event))
|
||||
.collect();
|
||||
|
||||
let invited_room = InvitedRoom {
|
||||
invite_state: InviteState {
|
||||
events: invite_state_events,
|
||||
events: state_events,
|
||||
},
|
||||
};
|
||||
if !invited_room.is_empty() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue