Link Search Menu Expand Document

Method: messages.getSearchResultsCalendar

Back to methods index

Returns information about the next messages of the specified type in the chat split by days.

Returns the results in reverse chronological order.
Can return partial results for the last returned day.

Parameters:

NameTypeDescriptionRequired
peerUsername, chat ID, Update, Message or InputPeerPeer where to searchOptional
saved_peer_idUsername, chat ID, Update, Message or InputPeerSearch within the saved message dialog » with this ID.Optional
filterMessagesFilterMessage filter, inputMessagesFilterEmpty, inputMessagesFilterMyMentions filters are not supported by this method.Optional
offset_idintOffsets for pagination, for more info click hereOptional
offset_dateintOffsets for pagination, for more info click hereOptional

Return type: messages.SearchResultsCalendar

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_SearchResultsCalendar = $MadelineProto->messages->getSearchResultsCalendar(peer: $InputPeer, saved_peer_id: $InputPeer, filter: $MessagesFilter, offset_id: $int, offset_date: $int, );