summary refs log tree commit diff
path: root/synapse
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
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')
-rw-r--r--synapse/__init__.py2
-rw-r--r--synapse/api/constants.py3
-rw-r--r--synapse/config/api.py2
-rw-r--r--synapse/handlers/sync.py14
4 files changed, 18 insertions, 3 deletions
diff --git a/synapse/__init__.py b/synapse/__init__.py

index d6a191ccc6..5da59aa924 100644 --- a/synapse/__init__.py +++ b/synapse/__init__.py
@@ -27,4 +27,4 @@ try: except ImportError: pass -__version__ = "0.34.1.1" +__version__ = "0.99.0rc2" diff --git a/synapse/api/constants.py b/synapse/api/constants.py
index 0cbae9429b..f47c33a074 100644 --- a/synapse/api/constants.py +++ b/synapse/api/constants.py
@@ -73,6 +73,7 @@ class EventTypes(object): RoomHistoryVisibility = "m.room.history_visibility" CanonicalAlias = "m.room.canonical_alias" RoomAvatar = "m.room.avatar" + RoomEncryption = "m.room.encryption" GuestAccess = "m.room.guest_access" # These are used for validation @@ -109,7 +110,7 @@ class RoomVersions(object): class RoomDisposition(object): - STABLE = "stable", + STABLE = "stable" UNSTABLE = "unstable" diff --git a/synapse/config/api.py b/synapse/config/api.py
index 403d96ba76..9f25bbc5cb 100644 --- a/synapse/config/api.py +++ b/synapse/config/api.py
@@ -24,6 +24,7 @@ class ApiConfig(Config): EventTypes.JoinRules, EventTypes.CanonicalAlias, EventTypes.RoomAvatar, + EventTypes.RoomEncryption, EventTypes.Name, ]) @@ -36,5 +37,6 @@ class ApiConfig(Config): - "{JoinRules}" - "{CanonicalAlias}" - "{RoomAvatar}" + - "{RoomEncryption}" - "{Name}" """.format(**vars(EventTypes)) 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,