refactor: remove verified unused internals (#6460)

* refactor: remove verified unused internals

* test(linear): synchronize webhook shutdown with writer join
This commit is contained in:
chengyongru authored and GitHub committed 2026-10-26 21:45:36 +08:00
1 parent 3230013963
commit f23a6d1485
105 files changed
+207 -1282

No files matched your search

+2 -2
View File
@@ -1348,7 +1348,7 @@ class MatrixChannel(BaseChannel):
return None
async def _fetch_media_attachment(
self, room: MatrixRoom, event: MatrixMediaEvent,
self, event: MatrixMediaEvent,
) -> tuple[dict[str, Any] | None, str]:
"""Download, decrypt if needed, and persist a Matrix attachment."""
atype = self._event_attachment_type(event)
@@ -1437,7 +1437,7 @@ class MatrixChannel(BaseChannel):
or not self._should_process_message(room, event)
):
return
attachment, marker = await self._fetch_media_attachment(room, event)
attachment, marker = await self._fetch_media_attachment(event)
parts: list[str] = []
if isinstance(body := getattr(event, "body", None), str) and body.strip():
parts.append(body.strip())
@@ -2781,7 +2781,6 @@ async def test_fetch_media_rejects_missing_declared_size(monkeypatch, tmp_path)
)
attachment, marker = await channel._fetch_media_attachment(
SimpleNamespace(room_id="!room:matrix.org"),
event,
)
@@ -2809,7 +2808,6 @@ async def test_fetch_media_rejects_bool_declared_size(monkeypatch, tmp_path) ->
)
attachment, marker = await channel._fetch_media_attachment(
SimpleNamespace(room_id="!room:matrix.org"),
event,
)
@@ -2837,7 +2835,6 @@ async def test_fetch_media_rejects_declared_oversized_before_download(monkeypatc
)
attachment, marker = await channel._fetch_media_attachment(
SimpleNamespace(room_id="!room:matrix.org"),
event,
)
@@ -2865,7 +2862,6 @@ async def test_fetch_media_maps_streaming_cap_to_too_large(monkeypatch, tmp_path
)
attachment, marker = await channel._fetch_media_attachment(
SimpleNamespace(room_id="!room:matrix.org"),
event,
)