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

Commit 848f7e3

Browse files
authored
Remove unspecced and buggy PUT method on the unstable /rooms/<room_id>/batch_send endpoint. (#15199)
1 parent 7ae4f72 commit 848f7e3

File tree

2 files changed

+2
-15
lines changed

2 files changed

+2
-15
lines changed

changelog.d/15199.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Remove unspecced and buggy `PUT` method on the unstable `/rooms/<room_id>/batch_send` endpoint.

synapse/rest/client/room_batch.py

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@
1515
import logging
1616
import re
1717
from http import HTTPStatus
18-
from typing import TYPE_CHECKING, Awaitable, Tuple
19-
20-
from twisted.web.server import Request
18+
from typing import TYPE_CHECKING, Tuple
2119

2220
from synapse.api.constants import EventContentFields
2321
from synapse.api.errors import AuthError, Codes, SynapseError
@@ -30,7 +28,6 @@
3028
parse_strings_from_args,
3129
)
3230
from synapse.http.site import SynapseRequest
33-
from synapse.rest.client.transactions import HttpTransactionCache
3431
from synapse.types import JsonDict
3532

3633
if TYPE_CHECKING:
@@ -79,7 +76,6 @@ def __init__(self, hs: "HomeServer"):
7976
self.event_creation_handler = hs.get_event_creation_handler()
8077
self.auth = hs.get_auth()
8178
self.room_batch_handler = hs.get_room_batch_handler()
82-
self.txns = HttpTransactionCache(hs)
8379

8480
async def on_POST(
8581
self, request: SynapseRequest, room_id: str
@@ -249,16 +245,6 @@ async def on_POST(
249245

250246
return HTTPStatus.OK, response_dict
251247

252-
def on_GET(self, request: Request, room_id: str) -> Tuple[int, str]:
253-
return HTTPStatus.NOT_IMPLEMENTED, "Not implemented"
254-
255-
def on_PUT(
256-
self, request: SynapseRequest, room_id: str
257-
) -> Awaitable[Tuple[int, JsonDict]]:
258-
return self.txns.fetch_or_execute_request(
259-
request, self.on_POST, request, room_id
260-
)
261-
262248

263249
def register_servlets(hs: "HomeServer", http_server: HttpServer) -> None:
264250
msc2716_enabled = hs.config.experimental.msc2716_enabled

0 commit comments

Comments
 (0)