Interface GetChatMessageCounts

Returns approximate numbers of messages of the specified types in the chat or its topic. Request type for Tdjson#getChatMessageCounts.

interface GetChatMessageCounts {
    @type: "getChatMessageCounts";
    chat_id: number;
    filters: SearchMessagesFilter[];
    return_local?: boolean;
    topic_id: MessageTopic;
}

Properties

@type: "getChatMessageCounts"
chat_id: number

Identifier of the chat in which to count messages.

Filters for message content; searchMessagesFilterEmpty is unsupported in this function.

return_local?: boolean

Pass true to get the numbers of messages without sending network requests; -1 is returned for the numbers of messages, which are unknown locally.

topic_id: MessageTopic

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