mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-15 11:15:35 -04:00
Merge pull request #180 from matrix-org/erikj/prev_state_context
Don't needlessly compute prev_state
This commit is contained in:
commit
3bbd0d0e09
3 changed files with 5 additions and 5 deletions
|
@ -78,7 +78,9 @@ class BaseHandler(object):
|
|||
context = yield state_handler.compute_event_context(builder)
|
||||
|
||||
if builder.is_state():
|
||||
builder.prev_state = context.prev_state_events
|
||||
builder.prev_state = yield self.store.add_event_hashes(
|
||||
context.prev_state_events
|
||||
)
|
||||
|
||||
yield self.auth.add_auth_events(builder, context)
|
||||
|
||||
|
|
|
@ -169,10 +169,6 @@ class StateHandler(object):
|
|||
context.current_state = curr_state
|
||||
context.state_group = group if not event.is_state() else None
|
||||
|
||||
prev_state = yield self.store.add_event_hashes(
|
||||
prev_state
|
||||
)
|
||||
|
||||
if event.is_state():
|
||||
key = (event.type, event.state_key)
|
||||
if key in context.current_state:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue