diff options
author | Erik Johnston <erik@matrix.org> | 2019-01-16 15:13:07 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2019-01-23 20:04:57 +0000 |
commit | 886e5acc762b879b606773b511ff92345aef14c6 (patch) | |
tree | 9363e79da5a17c04780041f2598f49e1552edf69 /synapse/storage | |
parent | Merge pull request #4445 from matrix-org/anoa/user_dir_develop_backport (diff) | |
download | synapse-886e5acc762b879b606773b511ff92345aef14c6.tar.xz |
Store rejected remote invite events as outliers
Currently they're stored as non-outliers even though the server isn't in the room, which can be problematic in places where the code assumes it has the state for all non outlier events. In particular, there is an edge case where persisting the leave event triggers a state resolution, which requires looking up the room version from state. Since the server doesn't have the state, this causes an exception to be thrown.
Diffstat (limited to 'synapse/storage')
-rw-r--r-- | synapse/storage/roommember.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/synapse/storage/roommember.py b/synapse/storage/roommember.py index 0707f9a86a..c7488f4259 100644 --- a/synapse/storage/roommember.py +++ b/synapse/storage/roommember.py @@ -591,10 +591,7 @@ class RoomMemberStore(RoomMemberWorkerStore): # 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 and ( - not event.internal_metadata.is_outlier() - or event.internal_metadata.is_invite_from_remote() - ) + is_new_state = not backfilled is_mine = self.hs.is_mine_id(event.state_key) if is_new_state and is_mine: if event.membership == Membership.INVITE: |