-
-
Notifications
You must be signed in to change notification settings - Fork 142
Attach Media Group to Message #663
-
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?
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 2 comments
-
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();
Beta Was this translation helpful? Give feedback.
All reactions
-
Actually it is possible, just add caption key to the first only attachment.
Beta Was this translation helpful? Give feedback.