summary refs log tree commit diff
path: root/synapse/rest
diff options
context:
space:
mode:
authorQuentin Gliech <quenting@element.io>2023-03-03 13:22:49 +0100
committerGitHub <noreply@github.com>2023-03-03 12:22:49 +0000
commit848f7e3d5ff38ca28e56e6143e584974da1eec42 (patch)
tree95593176426f7fdb429b824718eaaa7f428b4668 /synapse/rest
parentConfigure ruff to automatically fix issues. (#15194) (diff)
downloadsynapse-848f7e3d5ff38ca28e56e6143e584974da1eec42.tar.xz
Remove unspecced and buggy `PUT` method on the unstable `/rooms/<room_id>/batch_send` endpoint. (#15199)
Diffstat (limited to 'synapse/rest')
-rw-r--r--synapse/rest/client/room_batch.py16
1 files changed, 1 insertions, 15 deletions
diff --git a/synapse/rest/client/room_batch.py b/synapse/rest/client/room_batch.py
index 10be4a781b..ef284ecc11 100644
--- a/synapse/rest/client/room_batch.py
+++ b/synapse/rest/client/room_batch.py
@@ -15,9 +15,7 @@
 import logging
 import re
 from http import HTTPStatus
-from typing import TYPE_CHECKING, Awaitable, Tuple
-
-from twisted.web.server import Request
+from typing import TYPE_CHECKING, Tuple
 
 from synapse.api.constants import EventContentFields
 from synapse.api.errors import AuthError, Codes, SynapseError
@@ -30,7 +28,6 @@ from synapse.http.servlet import (
     parse_strings_from_args,
 )
 from synapse.http.site import SynapseRequest
-from synapse.rest.client.transactions import HttpTransactionCache
 from synapse.types import JsonDict
 
 if TYPE_CHECKING:
@@ -79,7 +76,6 @@ class RoomBatchSendEventRestServlet(RestServlet):
         self.event_creation_handler = hs.get_event_creation_handler()
         self.auth = hs.get_auth()
         self.room_batch_handler = hs.get_room_batch_handler()
-        self.txns = HttpTransactionCache(hs)
 
     async def on_POST(
         self, request: SynapseRequest, room_id: str
@@ -249,16 +245,6 @@ class RoomBatchSendEventRestServlet(RestServlet):
 
         return HTTPStatus.OK, response_dict
 
-    def on_GET(self, request: Request, room_id: str) -> Tuple[int, str]:
-        return HTTPStatus.NOT_IMPLEMENTED, "Not implemented"
-
-    def on_PUT(
-        self, request: SynapseRequest, room_id: str
-    ) -> Awaitable[Tuple[int, JsonDict]]:
-        return self.txns.fetch_or_execute_request(
-            request, self.on_POST, request, room_id
-        )
-
 
 def register_servlets(hs: "HomeServer", http_server: HttpServer) -> None:
     msc2716_enabled = hs.config.experimental.msc2716_enabled