messages.GetSearchResultsPositions

class pyrogram.raw.functions.messages.GetSearchResultsPositions

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

Details:
  • Layer: 227

  • ID: 9C7F2F10

Parameters:
  • peer (InputPeer) – Peer where to search

  • filter (MessagesFilter) – Message filter, inputMessagesFilterEmpty, inputMessagesFilterMyMentions filters are not supported by this method.

  • offset_id (int 32-bit) – Offsets for pagination, for more info click here

  • limit (int 32-bit) – Maximum number of results to return, see pagination

  • saved_peer_id (InputPeer, optional) – Search within the saved message dialog » with this ID.

Returns:

messages.SearchResultsPositions

TL Schema

messages.getSearchResultsPositions#9c7f2f10
flags:#
peer:InputPeer
saved_peer_id:flags.2?InputPeer
filter:MessagesFilter
offset_id:int
limit:int

= messages.SearchResultsPositions

Parameter Tree

GetSearchResultsPositions
├── peer → InputPeer
│ ├── InputPeerEmpty
│ ├── InputPeerSelf
│ ├── InputPeerChat
│ │ └── chat_id → long
│ ├── InputPeerUser
│ │ ├── user_id → long
│ │ └── access_hash → long
│ ├── InputPeerChannel
│ │ ├── channel_id → long
│ │ └── access_hash → long
│ │ ├── peer → InputPeer
│ │ │ ├── InputPeerEmpty
│ │ │ ├── InputPeerSelf
│ │ │ ├── InputPeerChat
│ │ │ ├── InputPeerUser
│ │ │ ├── InputPeerChannel
│ │ │ ├── InputPeerUserFromMessage
│ │ │ └── InputPeerChannelFromMessage
│ │ ├── msg_id → int
│ │ └── user_id → long
│ ├── peer → InputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ ├── msg_id → int
│ └── channel_id → long
├── saved_peer_id → InputPeer (optional)
│ ├── InputPeerEmpty
│ ├── InputPeerSelf
│ ├── InputPeerChat
│ │ └── chat_id → long
│ ├── InputPeerUser
│ │ ├── user_id → long
│ │ └── access_hash → long
│ ├── InputPeerChannel
│ │ ├── channel_id → long
│ │ └── access_hash → long
│ │ ├── peer → InputPeer
│ │ │ ├── InputPeerEmpty
│ │ │ ├── InputPeerSelf
│ │ │ ├── InputPeerChat
│ │ │ ├── InputPeerUser
│ │ │ ├── InputPeerChannel
│ │ │ ├── InputPeerUserFromMessage
│ │ │ └── InputPeerChannelFromMessage
│ │ ├── msg_id → int
│ │ └── user_id → long
│ ├── peer → InputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ ├── msg_id → int
│ └── channel_id → long
├── filter → MessagesFilter
│ │ └── missed → true (optional)
├── offset_id → int
└── limit → int

Example

await app.invoke(
    GetSearchResultsPositions(
        peer=await app.resolve_peer(chat_id),
        saved_peer_id=await app.resolve_peer(chat_id),
        filter=InputMessagesFilterEmpty(),
        offset_id=0,
        limit=0,
    )
)