Support HTML links in MAX poster wrappers

This commit is contained in:
Your Name
2026-08-04 20:16:19 +05:00
parent 347d1dfe2f
commit d66be9f7a6
5 changed files with 15 additions and 3 deletions
+2 -1
View File
@@ -156,7 +156,7 @@ class MAXAPIClient:
raise RuntimeError(last_error or "MAX API request failed")
async def send_message(self, chat_id: int, text: str, attachments: list[dict[str, Any]] | None = None) -> dict[str, Any]:
payload: dict[str, Any] = {"text": text, "notify": True}
payload: dict[str, Any] = {"text": text, "notify": True, "format": "html"}
if attachments:
payload["attachments"] = attachments
return await self.request("POST", f"/messages?chat_id={chat_id}", json=payload)
@@ -384,6 +384,7 @@ class MAXPoster:
self.common_tags,
self.footer_text,
self.header_text,
parse_mode="html",
)
async def download_media_to_temp(self, session: aiohttp.ClientSession, item: dict[str, Any]) -> Path | None: