File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -332,6 +332,28 @@ a previous message to edit::
332
332
])
333
333
);
334
334
335
+ Answering Callback Queries in Telegram
336
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
337
+
338
+ .. versionadded :: 6.3
339
+
340
+ The ``TelegramOptions::answerCallbackQuery() `` method was introduced in Symfony 6.3.
341
+
342
+ When sending message with inline keyboard buttons with callback data, you can use
343
+ :class: `Symfony\\ Component\\ Notifier\\ Bridge\\ Telegram\\ TelegramOptions ` to `answer callback queries `_::
344
+
345
+ use Symfony\Component\Notifier\Bridge\Telegram\TelegramOptions;
346
+ use Symfony\Component\Notifier\Message\ChatMessage;
347
+
348
+ $chatMessage = new ChatMessage('Thank you!');
349
+ $telegramOptions = (new TelegramOptions())
350
+ ->chatId($chatId)
351
+ ->answerCallbackQuery(
352
+ callbackQueryId: '12345', // extracted from callback
353
+ showAlert: true,
354
+ cacheTime: 1,
355
+ );
356
+
335
357
Adding text to a Microsoft Teams Message
336
358
----------------------------------------
337
359
@@ -424,3 +446,4 @@ The result will be something like:
424
446
.. _`Embed elements` : https://discord.com/developers/docs/resources/webhook
425
447
.. _`message options` : https://core.telegram.org/bots/api
426
448
.. _`MessageCard options` : https://docs.microsoft.com/en-us/outlook/actionable-messages/message-card-reference
449
+ .. _`answer callback queries` : https://core.telegram.org/bots/api#answercallbackquery
You can’t perform that action at this time.
0 commit comments