summary refs log tree commit diff
path: root/synapse/events/__init__.py
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2019-01-24 18:33:27 +0000
committerGitHub <noreply@github.com>2019-01-24 18:33:27 +0000
commit80bcca659e42a8c3ec22cea855c5a007370fe5ad (patch)
treeee6b549cc63f08ac6e251ed7d2a9eff4e0873581 /synapse/events/__init__.py
parentMerge pull request #4437 from matrix-org/erikj/event_format_version_v2 (diff)
parentUpdate make_membership_event docs (diff)
downloadsynapse-80bcca659e42a8c3ec22cea855c5a007370fe5ad.tar.xz
Merge pull request #4405 from matrix-org/erikj/fixup_rejecting_invites
Store rejected remote invite events as outliers
Diffstat (limited to 'synapse/events/__init__.py')
-rw-r--r--synapse/events/__init__.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/synapse/events/__init__.py b/synapse/events/__init__.py
index 9dd6940385..888296933b 100644
--- a/synapse/events/__init__.py
+++ b/synapse/events/__init__.py
@@ -42,8 +42,13 @@ 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 is_out_of_band_membership(self):
+        """Whether this is an out of band membership, like an invite or an invite
+        rejection. This is needed as those events are marked as outliers, but
+        they still need to be processed as if they're new events (e.g. updating
+        invite state in the database, relaying to clients, etc).
+        """
+        return getattr(self, "out_of_band_membership", False)
 
     def get_send_on_behalf_of(self):
         """Whether this server should send the event on behalf of another server.