Forward a message with multiple media files using bot Telegram API
Asked Answered
F

2

9

I'm having a problem forwarding messages with multiple media files (in my particular case, photos).

I'm using forwardMessage method to forward the message that user sends to bot (which, in some cases, might contain more than one photo):

bot.forwardMessage(admin_id, from_chat_id, message_id)

But, the thing is, according to Telegram API v3.5, the message which contain media group breaks up into array of messages, and hence the bot breaks up the message from user into multiple messages. E.g. if user have sent a message with 3 photos, then the bot forwards 3 messages, each of which contains a photo.

What I want is to forward a message with multiple media files as it is, as one message, not as multiple messages.

I know that probably I can take each photo from each message that the bot receives, put them one-by-one into array, and then send it from the bot using sendMediaGroup method, but I'd like to know if I can get it working with forwardMessage method.

Thanks in advance.

Fervency answered 10/12, 2017 at 21:33 Comment(2)
Hello, here I have the same problem. Did you find any solution?Antisyphilitic
Have a look at this quiestion #71440569Xl
P
4

You can't forward original content via forwardMessage, for instance, you can't forward with an inline keyboard.

I think this may be a mistake, you can suggest that to @BotSupport.

Pirri answered 11/12, 2017 at 2:3 Comment(1)
Telegram clients (including unofficial) can do this...Baldric
L
3

Telegram API had updated a method call sendMediaGroup for sending images as album.

https://core.telegram.org/bots/api#sendmediagroup

Have a look :)

Lodi answered 14/2, 2019 at 8:42 Comment(1)
This isn't the same as forwarding though.Illimani

© 2022 - 2024 — McMap. All rights reserved.