Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/19646.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Advertise `org.matrix.msc4143` in `unstable_features` when `msc4143_enabled` is set.
2 changes: 2 additions & 0 deletions synapse/rest/client/versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ async def on_GET(self, request: SynapseRequest) -> tuple[int, JsonDict]:
),
# MSC4140: Delayed events
"org.matrix.msc4140": bool(self.config.server.max_event_delay_ms),
# MSC4143: Matrix RTC transports (LiveKit backend)
"org.matrix.msc4143": self.config.experimental.msc4143_enabled,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

org.matrix.msc4143 missing from unstable_features in /versions

Setting msc4143_enabled: true in experimental_features correctly registers the REST endpoint, but the corresponding org.matrix.msc4143 flag was never added to the unstable_features map returned by /_matrix/client/versions. Every other experimental MSC follows the pattern of advertising itself there; MSC4143 was simply missed.

This needs to be fixed in the MSC if desired.
The MSC does not currently prescribe this flag to be added to /versions

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah fair point, the msc’s unstable prefix section doesn't mention this. looks like it just got missed - every other msc does this and without it clients have no way to know if the unstable endpoint exists

i can open a pr on matrix-spec-proposals to add it. do you want me to keep this change here in the meantime or should i pull it out until the msc is updated?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added a thread on the MSC matrix-org/matrix-spec-proposals#4143 (comment)

We can see if the author gets back to us

I think it probably makes sense to have one (though it's not an automatic thing for every MSC as it's not always the case)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Basically think I'm waiting on this before we can continue with anything here.

# Simplified sliding sync
Comment on lines 191 to 196
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This adds a new /versions unstable_features flag for MSC4143, but there’s no accompanying test asserting it is false by default and true when experimental_features.msc4143_enabled is set (similar to the existing coverage for org.matrix.msc4140 in tests/rest/client/test_delayed_events.py). Adding a small /versions test would help prevent regressions.

Copilot uses AI. Check for mistakes.
"org.matrix.simplified_msc3575": msc3575_enabled,
# Arbitrary key-value profile fields.
Expand Down
20 changes: 19 additions & 1 deletion tests/rest/client/test_matrixrtc.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@
from twisted.internet.testing import MemoryReactor

from synapse.rest import admin
from synapse.rest.client import login, matrixrtc, register, room
from synapse.rest.client import login, matrixrtc, register, room, versions
from synapse.server import HomeServer
from synapse.util.clock import Clock

from tests import unittest
from tests.unittest import HomeserverTestCase, override_config

PATH_PREFIX = "/_matrix/client/unstable/org.matrix.msc4143"
Expand Down Expand Up @@ -103,3 +104,20 @@ def test_matrixrtc_endpoint_livekit_transport(self) -> None:
)
self.assertEqual(200, channel.code, channel.json_body)
self.assert_dict({"rtc_transports": [LIVEKIT_ENDPOINT]}, channel.json_body)


class MatrixRtcVersionsTestCase(HomeserverTestCase):
"""Tests that org.matrix.msc4143 is correctly advertised in /versions."""

servlets = [versions.register_servlets]

def test_msc4143_false_by_default(self) -> None:
channel = self.make_request("GET", "/_matrix/client/versions")
self.assertEqual(channel.code, 200, channel.result)
self.assertFalse(channel.json_body["unstable_features"]["org.matrix.msc4143"])

@unittest.override_config({"experimental_features": {"msc4143_enabled": True}})
def test_msc4143_true_if_enabled(self) -> None:
channel = self.make_request("GET", "/_matrix/client/versions")
self.assertEqual(channel.code, 200, channel.result)
self.assertTrue(channel.json_body["unstable_features"]["org.matrix.msc4143"])