summary refs log tree commit diff
path: root/synapse/events
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2016-03-31 15:00:42 +0100
committerMark Haines <mark.haines@matrix.org>2016-03-31 15:00:42 +0100
commit76503f95ed2b618a3ff97c6b04868d8e440ef9d4 (patch)
treede22e7fcb43e52af13fdd44a0eec038d93549913 /synapse/events
parentMerge pull request #676 from matrix-org/markjh/replicate_stateIII (diff)
downloadsynapse-76503f95ed2b618a3ff97c6b04868d8e440ef9d4.tar.xz
Remove the is_new_state argument to persist event.
Move the checks for whether an event is new state inside persist
event itself.

This was harder than expected because there wasn't enough information
passed to persist event to correctly handle invites from remote servers
for new rooms.
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 925a83c645..13154b1723 100644
--- a/synapse/events/__init__.py
+++ b/synapse/events/__init__.py
@@ -33,6 +33,9 @@ class _EventInternalMetadata(object):
     def is_outlier(self):
         return getattr(self, "outlier", False)
 
+    def is_invite_from_remote(self):
+        return getattr(self, "invite_from_remote", False)
+
 
 def _event_dict_property(key):
     def getter(self):