This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Commit bca64f9
David Robertson
Remove unused branch
I claim that it is impossible to hit the `continue` which is removed in
this commit. Setup:
- `events` is a list of all membership events in the range
`since < time <= now`.
- `non_joins` is the list of `e in events` with `e.membership` not equal
to`"join"`.
- `events` is a nonempty list by construction of
`mem_change_events_by_room_id`.
Rationale:
- We hit the deleted code only if `non_joins` is empty.
- If so, `events` consists only of `join` membership events.
- `events` is non_empty, so there was at least one join during the
sync period.
- Therefore the room_id will belong to
`sync_result_builder.joined_room_ids`. But this means we will have
`continue`d in the branch above.
- I'm assuming here that `joined_room_ids` and `events` are both using
the same `now_token.room_key`.1 parent 7aee344 commit bca64f9
1 file changed
+4
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1070 | 1070 | | |
1071 | 1071 | | |
1072 | 1072 | | |
1073 | | - | |
| 1073 | + | |
1074 | 1074 | | |
1075 | 1075 | | |
1076 | 1076 | | |
| |||
1091 | 1091 | | |
1092 | 1092 | | |
1093 | 1093 | | |
| 1094 | + | |
| 1095 | + | |
1094 | 1096 | | |
1095 | 1097 | | |
1096 | 1098 | | |
| |||
1837 | 1839 | | |
1838 | 1840 | | |
1839 | 1841 | | |
1840 | | - | |
1841 | | - | |
1842 | | - | |
1843 | | - | |
1844 | 1842 | | |
1845 | 1843 | | |
1846 | 1844 | | |
| |||
1861 | 1859 | | |
1862 | 1860 | | |
1863 | 1861 | | |
| 1862 | + | |
1864 | 1863 | | |
1865 | 1864 | | |
1866 | 1865 | | |
| |||
0 commit comments