Fix chat_kwargs() missing chat_id arg in multi-media send paths

Two call sites in send_media_post() (the >1-media-item send_media_group
branches) were missed when chat_kwargs() was parameterized for multi-route
support - broke TG posting for any post with more than one photo/video.
This commit is contained in:
2026-08-18 18:23:42 +05:00
parent 20135263c4
commit 2b0481b6a1
+2 -2
View File
@@ -354,7 +354,7 @@ class TelegramPoster:
else: else:
group.append(InputMediaVideo(media=item["media"], caption=cap, parse_mode="HTML")) group.append(InputMediaVideo(media=item["media"], caption=cap, parse_mode="HTML"))
msgs = await self.tg_retry_media( msgs = await self.tg_retry_media(
lambda: self.bot.send_media_group(media=group, **self.chat_kwargs()) lambda: self.bot.send_media_group(media=group, **self.chat_kwargs(chat_id, thread_id))
) )
message_ids.extend(int(m.message_id) for m in msgs) message_ids.extend(int(m.message_id) for m in msgs)
@@ -369,7 +369,7 @@ class TelegramPoster:
for item in chunk for item in chunk
] ]
msgs = await self.tg_retry_media( msgs = await self.tg_retry_media(
lambda: self.bot.send_media_group(media=g, **self.chat_kwargs()) lambda: self.bot.send_media_group(media=g, **self.chat_kwargs(chat_id, thread_id))
) )
message_ids.extend(int(m.message_id) for m in msgs) message_ids.extend(int(m.message_id) for m in msgs)