messages.getSearchResultsPositions #

Returns sparse positions of messages of the specified type in the chat to be used for shared media scroll implementation.

Returns the results in reverse chronological order (i.e., in order of decreasing message_id).

Layer 223

messages.searchResultsPositions#53b22baf count:int positions:Vector<SearchResultsPosition> = messages.SearchResultsPositions;
---functions---
messages.getSearchResultsPositions#9c7f2f10 flags:# peer:InputPeer saved_peer_id:flags.2?InputPeer filter:MessagesFilter offset_id:int limit:int = messages.SearchResultsPositions;

Parameters #

NameTypeDescription
flags#Flags, see TL conditional fields
peerInputPeerPeer where to search
saved_peer_idflags.2?InputPeerSearch within the saved message dialog » with this ID.
filterMessagesFilterMessage filter, inputMessagesFilterEmpty, inputMessagesFilterMyMentions filters are not supported by this method.
offset_idintOffsets for pagination, for more info click here
limitintMaximum number of results to return, see pagination

Result #

messages.SearchResultsPositions

Only users can use this method #

Possible errors #

CodeTypeDescription
400PEER_ID_INVALIDThe provided peer id is invalid.

Saved messages #

The Saved Messages chat allows users to bookmark messages and media: it's a personal cloud storage for any messages or media you may want to send or forward there.

inputMessagesFilterEmpty #

Filter is absent.

inputMessagesFilterMyMentions #

Return only messages where the current user was mentioned.

Pagination in the API #

How to fetch results from large lists of objects.