diff options
author | Erik Johnston <erikj@jki.re> | 2019-01-30 16:15:35 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-30 16:15:35 +0000 |
commit | d534a27fe8c36e642eecccf3b453cfb53fe9b673 (patch) | |
tree | 86d2d7c9a3351358578e8a6ede38631e6fdf5258 /synapse | |
parent | Merge pull request #4472 from matrix-org/neilj/room_capabilities (diff) | |
parent | Newsfile (diff) | |
download | synapse-d534a27fe8c36e642eecccf3b453cfb53fe9b673.tar.xz |
Merge pull request #4527 from matrix-org/erikj/fix_sending_remote_invite_rejections
Fix remote invite rejections not coming down sync
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/handlers/sync.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/synapse/handlers/sync.py b/synapse/handlers/sync.py index f7f768f751..28857bfc1c 100644 --- a/synapse/handlers/sync.py +++ b/synapse/handlers/sync.py @@ -1473,10 +1473,22 @@ class SyncHandler(object): if since_token and since_token.is_after(leave_token): continue + # If this is an out of band message, like a remote invite + # rejection, we include it in the recents batch. Otherwise, we + # let _load_filtered_recents handle fetching the correct + # batches. + # + # This is all screaming out for a refactor, as the logic here is + # subtle and the moving parts numerous. + if leave_event.internal_metadata.is_out_of_band_membership(): + batch_events = [leave_event] + else: + batch_events = None + room_entries.append(RoomSyncResultBuilder( room_id=room_id, rtype="archived", - events=None, + events=batch_events, newly_joined=room_id in newly_joined_rooms, full_state=False, since_token=since_token, |