summary refs log tree commit diff
path: root/synapse/events/__init__.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-02-04 10:16:51 +0000
committerErik Johnston <erik@matrix.org>2015-02-04 10:16:51 +0000
commitc0462dbf1533f285f632dcb0a74c0ef0c3e2475b (patch)
treed4383193fb52f1fd0214aad73ed315b42d07e9a4 /synapse/events/__init__.py
parentAdd doc to get_event (diff)
downloadsynapse-c0462dbf1533f285f632dcb0a74c0ef0c3e2475b.tar.xz
Rearrange persist_event so that do all the queries that need to be done before returning early if we have already persisted that event.
Diffstat (limited to 'synapse/events/__init__.py')
-rw-r--r--synapse/events/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/events/__init__.py b/synapse/events/__init__.py
index bf07951027..8f0c6e959f 100644
--- a/synapse/events/__init__.py
+++ b/synapse/events/__init__.py
@@ -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)