More bug fixes

This commit is contained in:
Erik Johnston 2014-12-08 14:50:48 +00:00
parent ba3d1e2fc0
commit ee3df06183
5 changed files with 20 additions and 13 deletions

View file

@ -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():