diff options
author | Erik Johnston <erik@matrix.org> | 2014-11-05 11:07:54 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2014-11-05 11:07:54 +0000 |
commit | 96c001e6688617cc365f548a3152a32c647ebc59 (patch) | |
tree | 678b86f68ca706a34dd4b73591f549e7f7ca9469 /synapse/state.py | |
parent | PEP8 (diff) | |
download | synapse-96c001e6688617cc365f548a3152a32c647ebc59.tar.xz |
Fix auth checks to all use the given old_event_state
Diffstat (limited to 'synapse/state.py')
-rw-r--r-- | synapse/state.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/synapse/state.py b/synapse/state.py index 9771883bc3..32744e047c 100644 --- a/synapse/state.py +++ b/synapse/state.py @@ -188,11 +188,15 @@ class StateHandler(object): consumeErrors=True ) - max_power = max([int(p) for p in new_powers]) + new_powers = [ + int(p) if p else 0 for p in new_powers + ] + + max_power = max(new_powers) curr_events = [ z[0] for z in zip(curr_events, new_powers) - if int(z[1]) == max_power + if z[1] == max_power ] if not curr_events: |