summary refs log tree commit diff
path: root/synapse/events
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-12-04 11:27:59 +0000
committerErik Johnston <erik@matrix.org>2014-12-04 11:27:59 +0000
commit5d7c9ab7898f2721aa3f60ab76c53dc44322be77 (patch)
tree7a6209af97b35e8d62db575327217c23592e68af /synapse/events
parentWIP for new way of managing events. (diff)
downloadsynapse-5d7c9ab7898f2721aa3f60ab76c53dc44322be77.tar.xz
Begin converting things to use the new Event structure
Diffstat (limited to 'synapse/events')
-rw-r--r--synapse/events/__init__.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/events/__init__.py b/synapse/events/__init__.py
index 6748198917..6a05ba2d16 100644
--- a/synapse/events/__init__.py
+++ b/synapse/events/__init__.py
@@ -81,6 +81,9 @@ class EventBase(object):
     type = _event_dict_property("type")
     user_id = _event_dict_property("sender")
 
+    def is_state(self):
+        return hasattr(self, "state_key")
+
     def get_dict(self):
         d = dict(self._original)
         d.update({