Skip to content

Commit 10b00a2

Browse files
committed
bugfix: ensure we can sync with SSS even with missing rooms
Fixes element-hq/element-x-ios#3300
1 parent 51dd4df commit 10b00a2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

synapse/storage/databases/main/stream.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1469,6 +1469,10 @@ async def bulk_get_last_event_pos_in_room_before_stream_ordering(
14691469
recheck_rooms: Set[str] = set()
14701470
min_token = end_token.stream
14711471
for room_id, stream in uncapped_results.items():
1472+
if stream is None:
1473+
# Despite the function not directly setting None, the cache can!
1474+
# See: https://github.com/element-hq/synapse/issues/17726
1475+
continue
14721476
if stream <= min_token:
14731477
results[room_id] = stream
14741478
else:

0 commit comments

Comments
 (0)