pub async fn search_messages(
chat_list: Option<ChatList>,
only_in_channels: bool,
query: String,
offset: String,
limit: i32,
filter: Option<SearchMessagesFilter>,
min_date: i32,
max_date: i32,
client_id: i32,
) -> Result<FoundMessages, Error>Expand description
Searches for messages in all chats except secret chats. Returns the results in reverse chronological order (i.e., in order of decreasing (date, chat_id, message_id)). For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit
ยงArguments
chat_list- Chat list in which to search messages; pass null to search in all chats regardless of their chat list. Only Main and Archive chat lists are supportedonly_in_channels- Pass true to search only for messages in channelsquery- Query to search foroffset- Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of resultslimit- The maximum number of messages to be returned; up to 100. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limitfilter- Additional filter for messages to search; pass null to search for all messages. Filters searchMessagesFilterMention, searchMessagesFilterUnreadMention, searchMessagesFilterUnreadReaction, searchMessagesFilterFailedToSend, and searchMessagesFilterPinned are unsupported in this functionmin_date- If not 0, the minimum date of the messages to returnmax_date- If not 0, the maximum date of the messages to returnclient_id- The client id to send the request to