mirror of
https://mau.dev/maunium/synapse.git
synced 2024-11-05 14:18:55 +01:00
Rejig the code to make it nicer
This commit is contained in:
parent
8199475ce0
commit
0bfdaf1f4f
1 changed files with 2 additions and 3 deletions
|
@ -398,6 +398,7 @@ class StateStore(SQLBaseStore):
|
||||||
# for them again.
|
# for them again.
|
||||||
state_dict = {key: None for key in types}
|
state_dict = {key: None for key in types}
|
||||||
state_dict.update(results[group])
|
state_dict.update(results[group])
|
||||||
|
results[group] = state_dict
|
||||||
else:
|
else:
|
||||||
state_dict = results[group]
|
state_dict = results[group]
|
||||||
|
|
||||||
|
@ -405,12 +406,10 @@ class StateStore(SQLBaseStore):
|
||||||
state_event = state_events[event_id]
|
state_event = state_events[event_id]
|
||||||
state_dict[(state_event.type, state_event.state_key)] = state_event
|
state_dict[(state_event.type, state_event.state_key)] = state_event
|
||||||
|
|
||||||
results[group] = state_dict
|
|
||||||
|
|
||||||
self._state_group_cache.update(
|
self._state_group_cache.update(
|
||||||
cache_seq_num,
|
cache_seq_num,
|
||||||
key=group,
|
key=group,
|
||||||
value=results[group],
|
value=state_dict,
|
||||||
full=(types is None),
|
full=(types is None),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue