telegraph
telegraph copied to clipboard
Attach Media Group to Message
First of all, thank you for implementing the mediaGroup method! @MarioGattolla.
Is it possible to attach a Media Group to a message? Are there any plans to implement it?
Hi @AlexanderFalkenberg , unfortunately sendMediaGroup method doesn't support the "caption" attribute (https://core.telegram.org/bots/api#sendmediagroup) like other attachments. You can try with the "reply_parameters" attribute, this will link the MediaGroup to a message like this :
$last_message_id = $telegraphChat->message('message')->send()->telegraphMessageId();
$telegraphChat->mediaGroup([
[
'type' => 'photo',
'media' => 'https://test.jpg',
],
[
'type' => 'photo',
'media' => 'https://test.jpg',
],
])->withData('reply_parameters', ['message_id' => $last_message_id])->send();