|
15 | 15 | import logging
|
16 | 16 | import re
|
17 | 17 | 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 |
21 | 19 |
|
22 | 20 | from synapse.api.constants import EventContentFields
|
23 | 21 | from synapse.api.errors import AuthError, Codes, SynapseError
|
|
30 | 28 | parse_strings_from_args,
|
31 | 29 | )
|
32 | 30 | from synapse.http.site import SynapseRequest
|
33 |
| -from synapse.rest.client.transactions import HttpTransactionCache |
34 | 31 | from synapse.types import JsonDict
|
35 | 32 |
|
36 | 33 | if TYPE_CHECKING:
|
@@ -79,7 +76,6 @@ def __init__(self, hs: "HomeServer"):
|
79 | 76 | self.event_creation_handler = hs.get_event_creation_handler()
|
80 | 77 | self.auth = hs.get_auth()
|
81 | 78 | self.room_batch_handler = hs.get_room_batch_handler()
|
82 |
| - self.txns = HttpTransactionCache(hs) |
83 | 79 |
|
84 | 80 | async def on_POST(
|
85 | 81 | self, request: SynapseRequest, room_id: str
|
@@ -249,16 +245,6 @@ async def on_POST(
|
249 | 245 |
|
250 | 246 | return HTTPStatus.OK, response_dict
|
251 | 247 |
|
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 |
| - |
262 | 248 |
|
263 | 249 | def register_servlets(hs: "HomeServer", http_server: HttpServer) -> None:
|
264 | 250 | msc2716_enabled = hs.config.experimental.msc2716_enabled
|
|
0 commit comments