diff options
author | Erik Johnston <erik@matrix.org> | 2014-12-11 13:25:19 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2014-12-11 13:25:19 +0000 |
commit | 8cdebce470869613658543cb79ed5dd97a5f0548 (patch) | |
tree | fda8993e709dcd1cea380df5db79bc6f202c3618 /synapse/state.py | |
parent | Fix some tests (diff) | |
download | synapse-8cdebce470869613658543cb79ed5dd97a5f0548.tar.xz |
Fix redactions. Fix 'age' key
Diffstat (limited to 'synapse/state.py')
-rw-r--r-- | synapse/state.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/synapse/state.py b/synapse/state.py index 7fdf596006..5bfa73fb46 100644 --- a/synapse/state.py +++ b/synapse/state.py @@ -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 = { |