summary refs log tree commit diff
path: root/synapse/handlers/sync.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-01-30 17:04:08 +0000
committerErik Johnston <erik@matrix.org>2019-01-30 17:04:08 +0000
commit62962e30e48c10cbbe4f52a2866c97c4845c0abb (patch)
tree573aac67b1fc9c7cdc8e1bb3dc51e1136ea2c549 /synapse/handlers/sync.py
parentMerge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes (diff)
parentMerge remote-tracking branch 'origin/release-v0.99.0' into develop (diff)
downloadsynapse-62962e30e48c10cbbe4f52a2866c97c4845c0abb.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
Diffstat (limited to 'synapse/handlers/sync.py')
-rw-r--r--synapse/handlers/sync.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/synapse/handlers/sync.py b/synapse/handlers/sync.py

index 9fd756df0b..7abe00332c 100644 --- a/synapse/handlers/sync.py +++ b/synapse/handlers/sync.py
@@ -1476,10 +1476,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,