This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Commit 0d0783c
David Robertson
Always call
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.old_mem_ev---exactly once.1 parent 6ff95ee commit 0d0783c
1 file changed
+3
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1855 | 1855 | | |
1856 | 1856 | | |
1857 | 1857 | | |
| 1858 | + | |
| 1859 | + | |
| 1860 | + | |
1858 | 1861 | | |
1859 | | - | |
1860 | | - | |
1861 | | - | |
1862 | | - | |
1863 | 1862 | | |
1864 | 1863 | | |
1865 | 1864 | | |
| |||
1883 | 1882 | | |
1884 | 1883 | | |
1885 | 1884 | | |
1886 | | - | |
1887 | | - | |
1888 | | - | |
1889 | 1885 | | |
1890 | 1886 | | |
1891 | 1887 | | |
| |||
0 commit comments