0

How can i minimize long pending of clocks display?

I use telegram bot sdk php in laravel, all works fine, but when I click on inline button I handle callback_data pending clocks not hidding. I try to reply with answer with answerCallBackQuery , but nothing changed. Please help me.

clocks

    $inline_keyboard[] = [
      [
       'text' =>'20-30',
       'callback_data' => 'age.2'
      ],
      [
       'text' =>'30-40',
       'callback_data' => 'age.3'
      ]
    ];

   $reply_markup = Telegram::replyKeyboardMarkup([
      'inline_keyboard' => $inline_keyboard,
      'resize_keyboard' => true
   ]);

   $this->replyWithMessage([
          'text' => 'How old are you?',
          'reply_markup' => $reply_markup,
  ]);





Andrey Fugas
  • 61
  • 1
  • 8
  • I don't see any `answerCallbackQuery` calls in your code above. To "remove" the clock icon, you need to call `answerCallbackQuery` with at least callback query id as parameter. – Groosha Nov 21 '19 at 21:36

1 Answers1

0

You have to use this

Telegram::answerCallbackQuery([
       'callback_query_id' => $callback_id
            ]);

Where your $callback_id is :

 $query = $update->getCallbackQuery();
 $callback_id = $query->getId();

Where $update is :

$update = Telegram::commandsHandler(true);