mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 11:26:09 -04:00
Clarify the invite flows
This commit is contained in:
parent
07f62da55a
commit
7c288c2250
3 changed files with 24 additions and 7 deletions
|
@ -588,10 +588,13 @@ class RoomMemberStore(RoomMemberWorkerStore):
|
|||
)
|
||||
|
||||
# We update the local_invites table only if the event is "current",
|
||||
# i.e., its something that has just happened.
|
||||
# The only current event that can also be an outlier is if its an
|
||||
# invite that has come in across federation.
|
||||
is_new_state = not backfilled
|
||||
# i.e., its something that has just happened. If the event is an
|
||||
# outlier it is only current if its a "new remote event", like a
|
||||
# remote invite or a rejection of a remote invite.
|
||||
is_new_state = not backfilled and (
|
||||
not event.internal_metadata.is_outlier()
|
||||
or event.internal_metadata.is_new_remote_event()
|
||||
)
|
||||
is_mine = self.hs.is_mine_id(event.state_key)
|
||||
if is_new_state and is_mine:
|
||||
if event.membership == Membership.INVITE:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue