summary refs log tree commit diff
path: root/synapse/state.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-12-11 13:25:19 +0000
committerErik Johnston <erik@matrix.org>2014-12-11 13:25:19 +0000
commit8cdebce470869613658543cb79ed5dd97a5f0548 (patch)
treefda8993e709dcd1cea380df5db79bc6f202c3618 /synapse/state.py
parentFix some tests (diff)
downloadsynapse-8cdebce470869613658543cb79ed5dd97a5f0548.tar.xz
Fix redactions. Fix 'age' key
Diffstat (limited to 'synapse/state.py')
-rw-r--r--synapse/state.py12
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 = {