summary refs log tree commit diff
path: root/synapse/state.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-12-08 14:50:48 +0000
committerErik Johnston <erik@matrix.org>2014-12-08 14:50:48 +0000
commitee3df06183cbebfe04f51cdd3a1a85a6b50efa9a (patch)
tree79240d0f78e800a9c327a5dd0df37ddfbb4a9729 /synapse/state.py
parentRemove unused import (diff)
downloadsynapse-ee3df06183cbebfe04f51cdd3a1a85a6b50efa9a.tar.xz
More bug fixes
Diffstat (limited to '')
-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():