Skip to content

Commit beea39f

Browse files
authored
Drop unstable MSC4151 implementation (#18052)
It's been rotated out of known clients, and should be safe for removal now. Fixes #17373 ### Pull Request Checklist <!-- Please read https://element-hq.github.io/synapse/latest/development/contributing_guide.html before submitting your pull request --> * [x] Pull request is based on the develop branch * [x] Pull request includes a [changelog file](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#changelog). The entry should: - Be a short description of your change which makes sense to users. "Fixed a bug that prevented receiving messages from other servers." instead of "Moved X method from `EventStore` to `EventWorkerStore`.". - Use markdown where necessary, mostly for `code blocks`. - End with either a period (.) or an exclamation mark (!). - Start with a capital letter. - Feel free to credit yourself, by adding a sentence "Contributed by @github_username." or "Contributed by [Your Name]." to the end of the entry. * [x] [Code style](https://element-hq.github.io/synapse/latest/code_style.html) is correct (run the [linters](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#run-the-linters))
1 parent 22c2add commit beea39f

File tree

4 files changed

+1
-17
lines changed

4 files changed

+1
-17
lines changed

changelog.d/18052.removal

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Remove the unstable [MSC4151](https://github.com/matrix-org/matrix-spec-proposals/pull/4151) implementation. The stable support remains, per [Matrix 1.13](https://spec.matrix.org/v1.13/client-server-api/#post_matrixclientv3roomsroomidreport).

synapse/config/experimental.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -436,9 +436,6 @@ def read_config(self, config: JsonDict, **kwargs: Any) -> None:
436436
("experimental", "msc4108_delegation_endpoint"),
437437
)
438438

439-
# MSC4151: Report room API (Client-Server API)
440-
self.msc4151_enabled: bool = experimental.get("msc4151_enabled", False)
441-
442439
# MSC4210: Remove legacy mentions
443440
self.msc4210_enabled: bool = experimental.get("msc4210_enabled", False)
444441

synapse/rest/client/reporting.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,11 @@
2020
#
2121

2222
import logging
23-
import re
2423
from http import HTTPStatus
2524
from typing import TYPE_CHECKING, Tuple
2625

2726
from synapse._pydantic_compat import StrictStr
2827
from synapse.api.errors import AuthError, Codes, NotFoundError, SynapseError
29-
from synapse.api.urls import CLIENT_API_PREFIX
3028
from synapse.http.server import HttpServer
3129
from synapse.http.servlet import (
3230
RestServlet,
@@ -127,16 +125,6 @@ def __init__(self, hs: "HomeServer"):
127125
self.clock = hs.get_clock()
128126
self.store = hs.get_datastores().main
129127

130-
# TODO: Remove the unstable variant after 2-3 releases
131-
# https://github.com/element-hq/synapse/issues/17373
132-
if hs.config.experimental.msc4151_enabled:
133-
self.PATTERNS.append(
134-
re.compile(
135-
f"^{CLIENT_API_PREFIX}/unstable/org.matrix.msc4151"
136-
"/rooms/(?P<room_id>[^/]*)/report$"
137-
)
138-
)
139-
140128
class PostBody(RequestBodyModel):
141129
reason: StrictStr
142130

synapse/rest/client/versions.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,6 @@ async def on_GET(self, request: SynapseRequest) -> Tuple[int, JsonDict]:
170170
),
171171
# MSC4140: Delayed events
172172
"org.matrix.msc4140": bool(self.config.server.max_event_delay_ms),
173-
# MSC4151: Report room API (Client-Server API)
174-
"org.matrix.msc4151": self.config.experimental.msc4151_enabled,
175173
# Simplified sliding sync
176174
"org.matrix.simplified_msc3575": msc3575_enabled,
177175
},

0 commit comments

Comments
 (0)