Link Search Menu Expand Document

Method: messages.checkHistoryImportPeer

Back to methods index

Check whether chat history exported from another chat app can be imported into a specific Telegram chat, click here for more info ».

If the check succeeds, and no RPC errors are returned, a messages.CheckedHistoryImportPeer constructor will be returned, with a confirmation text to be shown to the user, before actually initializing the import.

Parameters:

NameTypeDescriptionRequired
peerUsername, chat ID, Update, Message or InputPeerThe chat where we want to import history ».Optional

Return type: messages.CheckedHistoryImportPeer

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();

$messages_CheckedHistoryImportPeer = $MadelineProto->messages->checkHistoryImportPeer(peer: $InputPeer, );