diff options
author | Erik Johnston <erikj@jki.re> | 2018-11-05 13:35:15 +0000 |
---|---|---|
committer | Amber Brown <hawkowl@atleastfornow.net> | 2018-11-06 00:35:15 +1100 |
commit | bc80b3f454aa9b9ca8bc710ff502b83892ac0a91 (patch) | |
tree | da9af91ab5640b0124800a885a8f24767e2e54c7 /synapse/event_auth.py | |
parent | Set the encoding to UTF8 in the default logconfig (#4138) (diff) | |
download | synapse-bc80b3f454aa9b9ca8bc710ff502b83892ac0a91.tar.xz |
Add helpers for getting prev and auth events (#4139)
* Add helpers for getting prev and auth events This is in preparation for allowing the event format to change between room versions.
Diffstat (limited to 'synapse/event_auth.py')
-rw-r--r-- | synapse/event_auth.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/event_auth.py b/synapse/event_auth.py index d4d4474847..c81d8e6729 100644 --- a/synapse/event_auth.py +++ b/synapse/event_auth.py @@ -200,11 +200,11 @@ def _is_membership_change_allowed(event, auth_events): membership = event.content["membership"] # Check if this is the room creator joining: - if len(event.prev_events) == 1 and Membership.JOIN == membership: + if len(event.prev_event_ids()) == 1 and Membership.JOIN == membership: # Get room creation event: key = (EventTypes.Create, "", ) create = auth_events.get(key) - if create and event.prev_events[0][0] == create.event_id: + if create and event.prev_event_ids()[0] == create.event_id: if create.content["creator"] == event.state_key: return |