user press the button I send answer callback and delete the message with the button.
I'm using php so getting the json object in arrays like these:
Get the update
$content = file_get_contents("php://input");
$update = json_decode($content, true);
Getting message id
$message_id = $update['message']['message_id'];
$chat_id = $update["callback_query"]["from"]["id"];
Deleting message
apiRequestJson("deleteMessage", array('chat_id' => $chat_id,
'message_id' => $message_id));
But it's not getting the message id properly it gets null
So I debug and the message object is there in response.
Any idea what's happening here?
Message id will be inside callback_query.
$message_id = $update["callback_query"]['message']['message_id'];
Обсуждают сегодня