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.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/synapse/state.py b/synapse/state.py
index 464cbae564..19b408db45 100644
--- a/synapse/state.py
+++ b/synapse/state.py
@@ -149,7 +149,7 @@ class StateHandler(object):
         if event.is_state():
             ret = yield self.resolve_state_groups(
                 [e for e, _ in event.prev_events],
-                event_type=event.event_type,
+                event_type=event.type,
                 state_key=event.state_key,
             )
         else:
@@ -200,7 +200,11 @@ class StateHandler(object):
             prev_state = state.get((event_type, state_key), None)
             if prev_state:
                 prev_state = prev_state.event_id
-            defer.returnValue((name, state, [prev_state]))
+                prev_states = [prev_state]
+            else:
+                prev_states = []
+
+            defer.returnValue((name, state, prev_states))
 
         state = {}
         for group, g_state in state_groups.items():