Skip to content
Snippets Groups Projects
Commit bb99b1f5 authored by Erik Johnston's avatar Erik Johnston
Browse files

Add fast path in state res for zero prev events

parent ce6db0e5
No related branches found
No related tags found
No related merge requests found
......@@ -361,7 +361,12 @@ class StateHandler(object):
room_id, event_ids
)
if len(state_groups_ids) == 1:
if len(state_groups_ids) == 0:
defer.returnValue(_StateCacheEntry(
state={},
state_group=None,
))
elif len(state_groups_ids) == 1:
name, state_list = list(state_groups_ids.items()).pop()
prev_group, delta_ids = yield self.store.get_state_group_delta(name)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment