summary refs log tree commit diff
path: root/synapse/state.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-12-10 10:06:12 +0000
committerErik Johnston <erik@matrix.org>2014-12-10 11:37:47 +0000
commit95aa903ffa77effcbca2a510744c3c3fa9b46ed3 (patch)
treeda5d6eeec5da95549d19e97a072ce575c0fadf41 /synapse/state.py
parentThis is to test jenkins (diff)
downloadsynapse-95aa903ffa77effcbca2a510744c3c3fa9b46ed3.tar.xz
Try and figure out how and why signatures are being changed.
Diffstat (limited to 'synapse/state.py')
-rw-r--r--synapse/state.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/synapse/state.py b/synapse/state.py
index ebec0ad9dc..7fdf596006 100644
--- a/synapse/state.py
+++ b/synapse/state.py
@@ -144,6 +144,17 @@ class StateHandler(object):
                 (s.type, s.state_key): s for s in old_state
             }
             context.state_group = None
+
+            if hasattr(event, "auth_events") and event.auth_events:
+                auth_ids = zip(*event.auth_events)[0]
+                context.auth_events = {
+                    k: v
+                    for k, v in context.current_state.items()
+                    if v.event_id in auth_ids
+                }
+            else:
+                context.auth_events = {}
+
             defer.returnValue([])
 
         if event.is_state():