summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-12-10 12:00:05 +0000
committerErik Johnston <erik@matrix.org>2014-12-10 12:00:05 +0000
commit02db1fd2e7cfbd9741684a0a875789cb5d599f54 (patch)
tree5eb066e292b0b41c1dc8bf0b41d7c0aedc19579a /synapse
parentMake depth increase. (diff)
downloadsynapse-02db1fd2e7cfbd9741684a0a875789cb5d599f54.tar.xz
Fix AttributeError
Diffstat (limited to 'synapse')
-rw-r--r--synapse/events/__init__.py3
-rw-r--r--synapse/handlers/federation.py2
2 files changed, 4 insertions, 1 deletions
diff --git a/synapse/events/__init__.py b/synapse/events/__init__.py
index c43367fa20..5f41933174 100644
--- a/synapse/events/__init__.py
+++ b/synapse/events/__init__.py
@@ -55,6 +55,9 @@ class _EventInternalMetadata(object):
     def get_dict(self):
         return dict(self.__dict__)
 
+    def is_outlier(self):
+        return hasattr(self, "outlier") and self.outlier
+
 
 def _event_dict_property(key):
         def getter(self):
diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py
index 9ae3e5eca4..f38d9a48c8 100644
--- a/synapse/handlers/federation.py
+++ b/synapse/handlers/federation.py
@@ -687,7 +687,7 @@ class FederationHandler(BaseHandler):
             event.event_id, event.signatures,
         )
 
-        is_new_state = not event.internal_metadata.outlier
+        is_new_state = not event.internal_metadata.is_outlier()
 
         known_ids = set(
             [s.event_id for s in context.auth_events.values()]