Method: messages.prolongWebView
Indicate to the server (from the user side) that the user is still using a web app.
If the method returns a QUERY_ID_INVALID
error, the webview must be closed.
Parameters:
Name | Type | Description | Required |
---|---|---|---|
silent | Bool | Whether the inline message that will be sent by the bot on behalf of the user once the web app interaction is terminated should be sent silently (no notifications for the receivers). | Optional |
peer | Username, chat ID, Update, Message or InputPeer | Dialog where the web app was opened. | Optional |
bot | Username, chat ID, Update, Message or InputUser | Bot that owns the web app | Optional |
query_id | long | Web app interaction ID obtained from messages.requestWebView | Yes |
reply_to_msg_id | int | Whether the inline message that will be sent by the bot on behalf of the user once the web app interaction is terminated should be sent in reply to this message ID. | Optional |
top_msg_id | int | This field must contain the topic ID only when replying to messages in forum topics different from the “General” topic (i.e. reply_to_msg_id is set and reply_to_msg_id != topicID and topicID != 1 ). If the replied-to message is deleted before the method finishes execution, the value in this field will be used to send the message to the correct topic, instead of the “General” topic. | Optional |
send_as | Username, chat ID, Update, Message or InputPeer | Open the web app as the specified peer | Optional |
Return type: Bool
Can bots use this method: NO
MadelineProto Example (now async for huge speed and parallelism!):
if (!file_exists('madeline.php')) {
copy('https://phar.madelineproto.xyz/madeline.php', 'madeline.php');
}
include 'madeline.php';
$MadelineProto = new \danog\MadelineProto\API('session.madeline');
$MadelineProto->start();
$Bool = $MadelineProto->messages->prolongWebView(silent: Bool, peer: InputPeer, bot: InputUser, query_id: long, reply_to_msg_id: int, top_msg_id: int, send_as: InputPeer, );