diff options
author | David Robertson <davidr@element.io> | 2023-03-10 12:08:17 +0000 |
---|---|---|
committer | David Robertson <davidr@element.io> | 2023-03-10 12:08:17 +0000 |
commit | 85a98b1023a330c4c6179cc5c5660fbb54d5bb51 (patch) | |
tree | 0bcde66d5ced2f6222db7963bd764fbe8dd4df5f /synapse/visibility.py | |
parent | Require explicit boolean options from callers (diff) | |
download | synapse-85a98b1023a330c4c6179cc5c5660fbb54d5bb51.tar.xz |
Add explicit option for partial state rooms
Diffstat (limited to 'synapse/visibility.py')
-rw-r--r-- | synapse/visibility.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/visibility.py b/synapse/visibility.py index 46adaa0da1..d943ead6c5 100644 --- a/synapse/visibility.py +++ b/synapse/visibility.py @@ -579,6 +579,7 @@ async def filter_events_for_server( *, redact: bool, filter_out_erased_senders: bool, + filter_out_partial_state_rooms: bool, ) -> List[EventBase]: """Filter a list of events based on whether the target server is allowed to see them. @@ -604,7 +605,8 @@ async def filter_events_for_server( filter_out_erased_senders: If true, also filter out events whose sender has been erased. This is used e.g. during pagination to decide whether to backfill or not. - + filter_out_partial_state_rooms: If True, also filter out events in partial state + rooms. Returns The filtered events. """ @@ -654,7 +656,7 @@ async def filter_events_for_server( # this check but would base the filtering on an outdated view of the membership events. partial_state_invisible_event_ids: Set[str] = set() - if filter_out_erased_senders: + if filter_out_partial_state_rooms: for e in events: sender_domain = get_domain_from_id(e.sender) if ( |