summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2017-11-07 16:43:00 +0000
committerRichard van der Hoff <richard@matrix.org>2017-11-07 16:43:00 +0000
commit780dbb378fba8c7fb2eb154c2ce9f640ab52128f (patch)
treee5d86221ba9cc1a37cb8e7a5eaf28f48fc12a105 /synapse/handlers
parentfactor out _update_context_for_auth_events (diff)
downloadsynapse-780dbb378fba8c7fb2eb154c2ce9f640ab52128f.tar.xz
Update deltas when doing auth resolution
Fixes a bug where the persisted state groups were different to those actually
being used after auth resolution.
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/federation.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py
index 6cceb8998e..b9e1b24dab 100644
--- a/synapse/handlers/federation.py
+++ b/synapse/handlers/federation.py
@@ -1934,11 +1934,15 @@ class FederationHandler(BaseHandler):
             event_key ((str, str)): (type, state_key) for the current event.
                 this will not be included in the current_state in the context.
         """
-        context.current_state_ids = dict(context.current_state_ids)
-        context.current_state_ids.update({
+        state_updates = {
             k: a.event_id for k, a in auth_events.items()
             if k != event_key
-        })
+        }
+        context.current_state_ids = dict(context.current_state_ids)
+        context.current_state_ids.update(state_updates)
+        if context.delta_ids is not None:
+            context.delta_ids = dict(context.delta_ids)
+            context.delta_ids.update(state_updates)
         context.prev_state_ids = dict(context.prev_state_ids)
         context.prev_state_ids.update({
             k: a.event_id for k, a in auth_events.items()