Change context.auth_events to what the auth_events would be bases on context.current_state, rather than based on the auth_events from the event.

This commit is contained in:
Erik Johnston 2015-02-04 14:06:42 +00:00
parent 03d415a6a2
commit 650e32d455
3 changed files with 15 additions and 9 deletions

View file

@ -103,7 +103,9 @@ class StateHandler(object):
context.state_group = None
if hasattr(event, "auth_events") and event.auth_events:
auth_ids = zip(*event.auth_events)[0]
auth_ids = self.hs.get_auth().compute_auth_events(
event, context.current_state
)
context.auth_events = {
k: v
for k, v in context.current_state.items()
@ -149,7 +151,9 @@ class StateHandler(object):
event.unsigned["replaces_state"] = replaces.event_id
if hasattr(event, "auth_events") and event.auth_events:
auth_ids = zip(*event.auth_events)[0]
auth_ids = self.hs.get_auth().compute_auth_events(
event, context.current_state
)
context.auth_events = {
k: v
for k, v in context.current_state.items()