mirror of
https://github.com/element-hq/synapse.git
synced 2026-08-23 05:40:44 +00:00
Implement unstable support for MSC4491 (#19874)
Signed-off-by: timedout <git@nexy7574.co.uk>
This commit is contained in:
@@ -0,0 +1 @@
|
||||
Add experimental support for [MSC4491: Invite reasons in room creation](https://github.com/matrix-org/matrix-spec-proposals/pull/4491).
|
||||
@@ -622,3 +622,6 @@ class ExperimentalConfig(Config):
|
||||
# MSC4455: Preview URL capability
|
||||
# Tracked in: https://github.com/element-hq/synapse/issues/19719
|
||||
self.msc4452_enabled: bool = experimental.get("msc4452_enabled", False)
|
||||
|
||||
# MSC4491: Invite reasons in room creation
|
||||
self.msc4491_enabled: bool = experimental.get("msc4491_enabled", False)
|
||||
|
||||
@@ -1345,6 +1345,11 @@ class RoomCreationHandler:
|
||||
if is_direct:
|
||||
content["is_direct"] = is_direct
|
||||
|
||||
if self.config.experimental.msc4491_enabled:
|
||||
reason = config.get("uk.timedout.msc4491.invite_reason")
|
||||
if reason and isinstance(reason, str):
|
||||
content["reason"] = reason
|
||||
|
||||
for invitee in invite_list:
|
||||
(
|
||||
member_event_id,
|
||||
|
||||
@@ -208,6 +208,7 @@ class VersionsRestServlet(RestServlet):
|
||||
"org.matrix.msc4380.stable": True,
|
||||
# MSC4445: Sync timeline order
|
||||
"org.matrix.msc4445.initial_sync_timeline_topological_ordering": True,
|
||||
"uk.timedout.msc4491.create_room_invite_reasons": self.config.experimental.msc4491_enabled,
|
||||
},
|
||||
},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user