summary refs log tree commit diff
path: root/synapse/state.py
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/state.py')
-rw-r--r--synapse/state.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/state.py b/synapse/state.py
index 5bfa73fb46..f9ab5faf9e 100644
--- a/synapse/state.py
+++ b/synapse/state.py
@@ -159,7 +159,8 @@ class StateHandler(object):
                 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 replaces.event_id != event.event_id:  # Paranoia check
+                        event.unsigned["replaces_state"] = replaces.event_id
 
             defer.returnValue([])