Skip to content

getChatMessageCount

Function · TDLib 1.8.67 · d1085f9c

Returns approximate number of messages of the specified type in the chat or its topic

getChatMessageCount(
  chat_id: int53,
  topic_id: MessageTopic,
  filter: SearchMessagesFilter,
  return_local: Bool
) → Count

chat_id

int53

Identifier of the chat in which to count messages

topic_id

MessageTopic

Pass topic identifier to get number of messages only in specific topic; pass null to get number of messages in all topics; message threads aren't supported

filter

SearchMessagesFilter

Filter for message content; searchMessagesFilterEmpty is unsupported in this function

return_local

Bool

Pass true to get the number of messages without sending network requests, or -1 if the number of messages is unknown locally