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:
+2
-2
@@ -354,7 +354,7 @@ class TelegramPoster:
|
||||
else:
|
||||
group.append(InputMediaVideo(media=item["media"], caption=cap, parse_mode="HTML"))
|
||||
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)
|
||||
|
||||
@@ -369,7 +369,7 @@ class TelegramPoster:
|
||||
for item in chunk
|
||||
]
|
||||
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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user