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).
func (c *Client) MessagesGetSearchResultsPositions(ctx context.Context, request *MessagesGetSearchResultsPositionsRequest) (*MessagesSearchResultsPositions, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.MessagesGetSearchResultsPositions(ctx, &tg.MessagesGetSearchResultsPositionsRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // *MessagesSearchResultsPositions
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
Peer | InputPeerClass | yes | Peer where to search |
SavedPeerID | InputPeerClass | — | Search within the saved message dialog » with this ID. |
Filter | MessagesFilterClass | yes | Message filter, inputMessagesFilterEmpty, inputMessagesFilterMyMentions filters are not supported by this method. |
OffsetID | int | yes | Offsets for pagination, for more info click here |
Limit | int | yes | Maximum number of results to return, see pagination |
Returns
*MessagesSearchResultsPositions
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | PEER_ID_INVALID | The provided peer id is invalid. |
References
- Official documentation
- Generated Go reference
- TL definition:
messages.getSearchResultsPositions#9c7f2f10