diff options
author | Erik Johnston <erikj@jki.re> | 2017-01-18 10:53:00 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-18 10:53:00 +0000 |
commit | 15f012032c74663e85a891b1111693583b06bd48 (patch) | |
tree | 9ed0d532fb6c99b9c73acf45acac5998968a79cc /synapse/events/__init__.py | |
parent | Merge pull request #1820 from matrix-org/erikj/push_tools (diff) | |
parent | PEP8 (diff) | |
download | synapse-15f012032c74663e85a891b1111693583b06bd48.tar.xz |
Merge pull request #1818 from matrix-org/erikj/state_auth_splitout_split
Optimise state resolution
Diffstat (limited to 'synapse/events/__init__.py')
-rw-r--r-- | synapse/events/__init__.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/synapse/events/__init__.py b/synapse/events/__init__.py index da9f3ad436..e673e96cc0 100644 --- a/synapse/events/__init__.py +++ b/synapse/events/__init__.py @@ -79,7 +79,6 @@ class EventBase(object): auth_events = _event_dict_property("auth_events") depth = _event_dict_property("depth") content = _event_dict_property("content") - event_id = _event_dict_property("event_id") hashes = _event_dict_property("hashes") origin = _event_dict_property("origin") origin_server_ts = _event_dict_property("origin_server_ts") @@ -88,8 +87,6 @@ class EventBase(object): redacts = _event_dict_property("redacts") room_id = _event_dict_property("room_id") sender = _event_dict_property("sender") - state_key = _event_dict_property("state_key") - type = _event_dict_property("type") user_id = _event_dict_property("sender") @property @@ -162,6 +159,11 @@ class FrozenEvent(EventBase): else: frozen_dict = event_dict + self.event_id = event_dict["event_id"] + self.type = event_dict["type"] + if "state_key" in event_dict: + self.state_key = event_dict["state_key"] + super(FrozenEvent, self).__init__( frozen_dict, signatures=signatures, |