Skip to content

Commit 3e2cb6a

Browse files
authored
fix(telegram): remove deprecated normalize_whitespace param from (#6044)
telegramify_markdown.markdownify calls
1 parent 2583052 commit 3e2cb6a

3 files changed

Lines changed: 2 additions & 6 deletions

File tree

astrbot/core/platform/sources/telegram/tg_event.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,6 @@ async def send_with_client(
278278
try:
279279
md_text = telegramify_markdown.markdownify(
280280
chunk,
281-
normalize_whitespace=False,
282281
)
283282
await client.send_message(
284283
text=md_text,
@@ -456,7 +455,6 @@ async def _send_final_segment(self, delta: str, payload: dict[str, Any]) -> None
456455
try:
457456
markdown_text = telegramify_markdown.markdownify(
458457
delta,
459-
normalize_whitespace=False,
460458
)
461459
await self.client.send_message(
462460
text=markdown_text,
@@ -537,7 +535,6 @@ async def _draft_sender_loop() -> None:
537535
try:
538536
md = telegramify_markdown.markdownify(
539537
draft_text,
540-
normalize_whitespace=False,
541538
)
542539
await self._send_message_draft(
543540
user_name,
@@ -695,7 +692,6 @@ def _append_text(t: str) -> None:
695692
try:
696693
markdown_text = telegramify_markdown.markdownify(
697694
delta,
698-
normalize_whitespace=False,
699695
)
700696
await self.client.edit_message_text(
701697
text=markdown_text,

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ dependencies = [
4747
"slack-sdk>=3.35.0",
4848
"sqlalchemy[asyncio]>=2.0.41",
4949
"sqlmodel>=0.0.24",
50-
"telegramify-markdown>=0.5.1",
50+
"telegramify-markdown>=1.0.0",
5151
"watchfiles>=1.0.5",
5252
"websockets>=15.0.1",
5353
"wechatpy>=1.8.18",

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ silk-python>=0.2.6
4040
slack-sdk>=3.35.0
4141
sqlalchemy[asyncio]>=2.0.41
4242
sqlmodel>=0.0.24
43-
telegramify-markdown>=0.5.1
43+
telegramify-markdown>=1.0.0
4444
watchfiles>=1.0.5
4545
websockets>=15.0.1
4646
wechatpy>=1.8.18

0 commit comments

Comments
 (0)