diff options
author | Erik Johnston <erik@matrix.org> | 2015-03-09 13:29:41 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-03-09 13:29:41 +0000 |
commit | f31e65ca8b3a056b81c9ee1c8e5be298e36ed495 (patch) | |
tree | 414d6a488f090cea0aff41ef8ca7346f47567a62 /synapse/events/__init__.py | |
parent | Merge branch 'develop' of github.com:matrix-org/synapse into erikj-perf (diff) | |
parent | D'oh: underscore, not hyphen (diff) | |
download | synapse-f31e65ca8b3a056b81c9ee1c8e5be298e36ed495.tar.xz |
Merge branch 'develop' of github.com:matrix-org/synapse into erikj-perf
Diffstat (limited to 'synapse/events/__init__.py')
-rw-r--r-- | synapse/events/__init__.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/synapse/events/__init__.py b/synapse/events/__init__.py index 4252e5ab5c..64e08223b0 100644 --- a/synapse/events/__init__.py +++ b/synapse/events/__init__.py @@ -13,12 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -from synapse.util.frozenutils import freeze, unfreeze +from synapse.util.frozenutils import freeze class _EventInternalMetadata(object): def __init__(self, internal_metadata_dict): - self.__dict__ = internal_metadata_dict + self.__dict__ = dict(internal_metadata_dict) def get_dict(self): return dict(self.__dict__) @@ -77,7 +77,7 @@ class EventBase(object): return self.content["membership"] def is_state(self): - return hasattr(self, "state_key") + return hasattr(self, "state_key") and self.state_key is not None def get_dict(self): d = dict(self._event_dict) @@ -140,10 +140,6 @@ class FrozenEvent(EventBase): return e - def get_dict(self): - # We need to unfreeze what we return - return unfreeze(super(FrozenEvent, self).get_dict()) - def __str__(self): return self.__repr__() |