0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-15 23:43:53 +01:00

Merge pull request #4307 from matrix-org/erikj/v2_rooms

Add v2 room version
This commit is contained in:
Richard van der Hoff 2018-12-24 10:48:59 +01:00 committed by GitHub
commit cd018e3543
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 1 deletions

1
changelog.d/4307.feature Normal file
View file

@ -0,0 +1 @@
Add opt-in support for v2 rooms

View file

@ -102,6 +102,7 @@ class ThirdPartyEntityKind(object):
class RoomVersions(object):
V1 = "1"
V2 = "2"
VDH_TEST = "vdh-test-version"
STATE_V2_TEST = "state-v2-test"
@ -113,6 +114,7 @@ DEFAULT_ROOM_VERSION = RoomVersions.V1
# until we have a working v2.
KNOWN_ROOM_VERSIONS = {
RoomVersions.V1,
RoomVersions.V2,
RoomVersions.VDH_TEST,
RoomVersions.STATE_V2_TEST,
}

View file

@ -607,7 +607,9 @@ def resolve_events_with_store(room_version, state_sets, event_map, state_res_sto
return v1.resolve_events_with_store(
state_sets, event_map, state_res_store.get_events,
)
elif room_version in (RoomVersions.VDH_TEST, RoomVersions.STATE_V2_TEST):
elif room_version in (
RoomVersions.VDH_TEST, RoomVersions.STATE_V2_TEST, RoomVersions.V2,
):
return v2.resolve_events_with_store(
state_sets, event_map, state_res_store,
)