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 | InputReplyTo | If set, indicates that 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 the specified message or story. | Optional |
send_as | Username, chat ID, Update, Message or InputPeer | Open the web app as the specified peer | Optional |
Return type: Bool
Can userbots use this method: YES
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: $InputReplyTo, send_as: $InputPeer, );