get_chat_message_count

Function get_chat_message_count 

Source
pub async fn get_chat_message_count(
    chat_id: i64,
    filter: SearchMessagesFilter,
    saved_messages_topic_id: i64,
    return_local: bool,
    client_id: i32,
) -> Result<Count, Error>
Expand description

Returns approximate number of messages of the specified type in the chat

ยงArguments

  • chat_id - Identifier of the chat in which to count messages
  • filter - Filter for message content; searchMessagesFilterEmpty is unsupported in this function
  • saved_messages_topic_id - If not 0, only messages in the specified Saved Messages topic will be counted; pass 0 to count all messages, or for chats other than Saved Messages
  • return_local - Pass true to get the number of messages without sending network requests, or -1 if the number of messages is unknown locally
  • client_id - The client id to send the request to