mirror of
https://github.com/element-hq/synapse.git
synced 2024-12-22 20:50:23 +03:00
Assert instead of handling
This commit is contained in:
parent
f91bd40f50
commit
78589c3b4a
1 changed files with 7 additions and 6 deletions
|
@ -845,12 +845,13 @@ class SyncHandler(object):
|
||||||
# about them).
|
# about them).
|
||||||
state_filter = StateFilter.all()
|
state_filter = StateFilter.all()
|
||||||
|
|
||||||
if since_token:
|
# If this is an initial sync then full_state should be set, and
|
||||||
state_at_previous_sync = await self.get_state_at(
|
# that case is handled above. We assert here to ensure that this
|
||||||
room_id, stream_position=since_token, state_filter=state_filter
|
# is indeed the case.
|
||||||
)
|
assert since_token is not None
|
||||||
else:
|
state_at_previous_sync = await self.get_state_at(
|
||||||
state_at_previous_sync = {}
|
room_id, stream_position=since_token, state_filter=state_filter
|
||||||
|
)
|
||||||
|
|
||||||
if batch:
|
if batch:
|
||||||
current_state_ids = await self.state_store.get_state_ids_for_event(
|
current_state_ids = await self.state_store.get_state_ids_for_event(
|
||||||
|
|
Loading…
Reference in a new issue