Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Update docstring on is_out_of_band_membership
Browse files Browse the repository at this point in the history
  • Loading branch information
richvdh committed May 3, 2022
1 parent 78dad8a commit 947f651
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions synapse/events/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,17 @@ def is_outlier(self) -> bool:
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

This comment has been minimized.

Copy link
@DMRobertson

DMRobertson May 3, 2022

Contributor

should this be "that we aren't full members of."?

This comment has been minimized.

Copy link
@richvdh

richvdh May 3, 2022

Author Member

yes. But GH chose not to show me your comment until after the merge had happened :(.

cheekily fixed on develop in 5938928

This comment has been minimized.

Copy link
@DMRobertson

DMRobertson May 3, 2022

Contributor

Eventually consistent!

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)
"""
Expand Down

0 comments on commit 947f651

Please sign in to comment.