mirror of
https://github.com/element-hq/synapse.git
synced 2026-11-12 20:48:30 +00:00
`Filter` and `FilterCollection` from `synapse.api.filtering`, built from the filter JSON the Python one was built from, once per request. The checks are pure functions of the filter and the event, over events, presence updates and the JSON of ephemeral events and account data. The one part that needs the database, the `related_by_*` relation checks, is a trait the store will supply; `needs_relation_check` says when. The config flags the Python reads (MSC3773, MSC3874, profile updates in sync) are passed in, so the port has no reach into the config. `tests/sync/test_rust_filter.py` compares the two on random filters and random events, with and without the MSCs enabled. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0194eNQP5weBtVMg8NKtc6VU