diff options
| author | David Robertson <davidr@element.io> | 2021-12-07 16:31:16 +0000 |
|---|---|---|
| committer | David Robertson <davidr@element.io> | 2021-12-07 18:23:49 +0000 |
| commit | 0d0783caa35c8483c5a9b2198a35e4a358d03115 (patch) | |
| tree | 3a94e0d4081bb889c3552efb8ab3e4bf14d64988 /scripts-dev/complement.sh | |
| parent | Pull out `_fetch_membership_event_at` (diff) | |
| download | synapse-0d0783caa35c8483c5a9b2198a35e4a358d03115.tar.xz | |
Always call `old_mem_ev`---exactly once.
I claim this is identical to the existing behaviour. Proof: consider the boolean `room_id in sync_result_builder.joined_room_ids or has_join`. If this is true, we make the first call to `_fetch_membership_event_at`. Otherwise: - `room_id not in sync_result_builder.joined_room_ids` and `not has_join`. - The former means we continue on to inspect `events[-1].membership`. - This is not `"join"`, or else `room_id in sync_result_builder.joined_room_ids` would be true. - `has_join` is False, so we hit the `else` branch and make the second call to `_fetch_membership_event_at`. So, assuming we continue beyond the first `continue`, we always call fetch the old membership event exactly once. Do it up front to make the reader's life easier.
Diffstat (limited to 'scripts-dev/complement.sh')
0 files changed, 0 insertions, 0 deletions
