Fix redactions. Fix 'age' key

This commit is contained in:
Erik Johnston 2014-12-11 13:25:19 +00:00
parent 4d6af0dde3
commit 8cdebce470
6 changed files with 88 additions and 35 deletions

View file

@ -155,6 +155,12 @@ class StateHandler(object):
else:
context.auth_events = {}
if event.is_state():
key = (event.type, event.state_key)
if key in context.current_state:
replaces = context.current_state[key]
event.unsigned["replaces_state"] = replaces.event_id
defer.returnValue([])
if event.is_state():
@ -177,6 +183,12 @@ class StateHandler(object):
prev_state
)
if event.is_state():
key = (event.type, event.state_key)
if key in context.current_state:
replaces = context.current_state[key]
event.unsigned["replaces_state"] = replaces.event_id
if hasattr(event, "auth_events") and event.auth_events:
auth_ids = zip(*event.auth_events)[0]
context.auth_events = {