Interface GetChatMessageCount

Returns approximate number of messages of the specified type in the chat. Request type for Tdjson#getChatMessageCount.

interface GetChatMessageCount {
    @type: "getChatMessageCount";
    chat_id: number;
    filter: SearchMessagesFilter;
    return_local?: boolean;
    saved_messages_topic_id: number;
}

Properties

@type: "getChatMessageCount"
chat_id: number

Identifier of the chat in which to count messages.

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

return_local?: boolean

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

saved_messages_topic_id: number

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.