mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-10-01 08:25:44 -04:00
Merge pull request #4128 from matrix-org/erikj/state_res_v2_version
Add STATE_V2_TEST room version
This commit is contained in:
commit
1b21e771d0
1
changelog.d/4128.misc
Normal file
1
changelog.d/4128.misc
Normal file
@ -0,0 +1 @@
|
|||||||
|
Add STATE_V2_TEST room version
|
@ -102,6 +102,7 @@ class ThirdPartyEntityKind(object):
|
|||||||
class RoomVersions(object):
|
class RoomVersions(object):
|
||||||
V1 = "1"
|
V1 = "1"
|
||||||
VDH_TEST = "vdh-test-version"
|
VDH_TEST = "vdh-test-version"
|
||||||
|
STATE_V2_TEST = "state-v2-test"
|
||||||
|
|
||||||
|
|
||||||
# the version we will give rooms which are created on this server
|
# the version we will give rooms which are created on this server
|
||||||
@ -109,7 +110,11 @@ DEFAULT_ROOM_VERSION = RoomVersions.V1
|
|||||||
|
|
||||||
# vdh-test-version is a placeholder to get room versioning support working and tested
|
# vdh-test-version is a placeholder to get room versioning support working and tested
|
||||||
# until we have a working v2.
|
# until we have a working v2.
|
||||||
KNOWN_ROOM_VERSIONS = {RoomVersions.V1, RoomVersions.VDH_TEST}
|
KNOWN_ROOM_VERSIONS = {
|
||||||
|
RoomVersions.V1,
|
||||||
|
RoomVersions.VDH_TEST,
|
||||||
|
RoomVersions.STATE_V2_TEST,
|
||||||
|
}
|
||||||
|
|
||||||
ServerNoticeMsgType = "m.server_notice"
|
ServerNoticeMsgType = "m.server_notice"
|
||||||
ServerNoticeLimitReached = "m.server_notice.usage_limit_reached"
|
ServerNoticeLimitReached = "m.server_notice.usage_limit_reached"
|
||||||
|
@ -607,7 +607,7 @@ def resolve_events_with_store(room_version, state_sets, event_map, state_res_sto
|
|||||||
return v1.resolve_events_with_store(
|
return v1.resolve_events_with_store(
|
||||||
state_sets, event_map, state_res_store.get_events,
|
state_sets, event_map, state_res_store.get_events,
|
||||||
)
|
)
|
||||||
elif room_version == RoomVersions.VDH_TEST:
|
elif room_version in (RoomVersions.VDH_TEST, RoomVersions.STATE_V2_TEST):
|
||||||
return v2.resolve_events_with_store(
|
return v2.resolve_events_with_store(
|
||||||
state_sets, event_map, state_res_store,
|
state_sets, event_map, state_res_store,
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user