mirror of
https://github.com/element-hq/synapse.git
synced 2026-11-04 19:57:45 +00:00
The per-event decision of `filter_and_transform_events_for_client`: `_check_client_allowed_to_see_event` and the membership, history visibility, send-to-client and effective visibility checks under it, the call invite rule, and the membership annotation for MSC4115. The inputs are the event, the user's membership and the history visibility at it as events, and flags; loading those is the caller's job, so the module can serve the sync handler and later ports alike. The erased-sender case prunes through the existing Rust redaction. The `allowed` closure in the Python is now a module-level function, `_check_event_for_client`, with the same body, so that `tests/sync/test_rust_visibility.py` can compare the two exactly on random events, state and flags, sticky and outlier events included. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0194eNQP5weBtVMg8NKtc6VU