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

Commit

Permalink
Merge pull request #481 from matrix-org/erikj/SYN-589
Browse files Browse the repository at this point in the history
Don't include old left rooms in /sync
  • Loading branch information
erikjohnston committed Jan 12, 2016
2 parents 42aa1f3 + 70dfe4d commit ea47760
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion synapse/handlers/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,8 @@ def incremental_sync_with_gap(self, sync_config, since_token):
sync_config, leave_event, since_token, tags_by_room,
account_data_by_room
)
archived.append(room_sync)
if room_sync:
archived.append(room_sync)

invited = [
InvitedSyncResult(room_id=event.room_id, invite=event)
Expand Down Expand Up @@ -726,6 +727,9 @@ def incremental_sync_for_archived_room(self, sync_config, leave_event,

leave_token = since_token.copy_and_replace("room_key", stream_token)

if since_token.is_after(leave_token):
defer.returnValue(None)

batch = yield self.load_filtered_recents(
leave_event.room_id, sync_config, leave_token, since_token,
)
Expand Down

0 comments on commit ea47760

Please sign in to comment.