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

Commit 7eaa408

Browse files
committed
Only enable MSC1767 room version if the config flag is on
Using a similar technique to knocking: https://github.com/matrix-org/synapse/pull/6739/files#diff-3af529eedb0e00279bafb7369370c9654b37792af8eafa0925400e9281d57f0a
1 parent 4ac2b94 commit 7eaa408

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

synapse/config/experimental.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
import attr
1818

19+
from synapse.api.room_versions import KNOWN_ROOM_VERSIONS, RoomVersions
1920
from synapse.config._base import Config
2021
from synapse.types import JsonDict
2122

@@ -134,3 +135,7 @@ def read_config(self, config: JsonDict, **kwargs: Any) -> None:
134135

135136
# MSC1767 and friends: Extensible Events
136137
self.msc1767_enabled: bool = experimental.get("msc1767_enabled", False)
138+
if self.msc1767_enabled:
139+
# Enable room version (and thus applicable push rules from MSC3931/3932)
140+
version_id = RoomVersions.MSC1767v10.identifier
141+
KNOWN_ROOM_VERSIONS[version_id] = RoomVersions.MSC1767v10

0 commit comments

Comments
 (0)