diff options
author | Erik Johnston <erik@matrix.org> | 2016-01-19 11:37:05 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-01-19 11:37:05 +0000 |
commit | 9a8949f0221b0487e42830c57873bddae40c056a (patch) | |
tree | bc6d459a0e5ea88432af7d253daf7e0e46c1f645 /synapse/events/__init__.py | |
parent | Change default pushrules back to notifying for all messages. (diff) | |
parent | Merge pull request #502 from matrix-org/erikj/push_notif_perf (diff) | |
download | synapse-9a8949f0221b0487e42830c57873bddae40c056a.tar.xz |
Merge branch 'develop' of github.com:matrix-org/synapse into default_notify
Diffstat (limited to 'synapse/events/__init__.py')
-rw-r--r-- | synapse/events/__init__.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/synapse/events/__init__.py b/synapse/events/__init__.py index 869a623090..bbfa5a7265 100644 --- a/synapse/events/__init__.py +++ b/synapse/events/__init__.py @@ -117,6 +117,15 @@ class EventBase(object): def __set__(self, instance, value): raise AttributeError("Unrecognized attribute %s" % (instance,)) + def __getitem__(self, field): + return self._event_dict[field] + + def __contains__(self, field): + return field in self._event_dict + + def items(self): + return self._event_dict.items() + class FrozenEvent(EventBase): def __init__(self, event_dict, internal_metadata_dict={}, rejected_reason=None): |