diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2022-05-03 13:47:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-03 12:47:56 +0000 |
commit | db2edf5a65c5bcac565e052b2dbd74253755a717 (patch) | |
tree | bfce61a18ba3ae38c41ca5587ea0604bb1363d38 /synapse/events | |
parent | Merge branch 'master' into develop (diff) | |
download | synapse-db2edf5a65c5bcac565e052b2dbd74253755a717.tar.xz |
Exclude OOB memberships from the federation sender (#12570)
As the comment says, there is no need to process such events, and indeed we need to avoid doing so. Fixes #12509.
Diffstat (limited to 'synapse/events')
-rw-r--r-- | synapse/events/__init__.py | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/synapse/events/__init__.py b/synapse/events/__init__.py index 9acb3c0cc4..3e4b4f0384 100644 --- a/synapse/events/__init__.py +++ b/synapse/events/__init__.py @@ -213,10 +213,17 @@ class _EventInternalMetadata: return self.outlier def is_out_of_band_membership(self) -> bool: - """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). + """Whether this event is an out-of-band membership. + + OOB memberships are a special case of outlier events: they are membership events + for federated rooms that we aren't full members. Examples include invites + received over federation, and rejections for such invites. + + The concept of an OOB membership is needed because these events need to be + processed as if they're new regular events (e.g. updating membership state in + the database, relaying to clients via /sync, etc) despite being outliers. + + See also https://matrix-org.github.io/synapse/develop/development/room-dag-concepts.html#out-of-band-membership-events. (Added in synapse 0.99.0, so may be unreliable for events received before that) """ |