api.getChatMessageCount()
Returns approximate number of messages of the specified type in the chat
Parameters
GetChatMessageCountParams:chevron_leftchevron_right
Parameters
Interface
| Name | Type | Description |
|---|---|---|
chatId | number | Identifier of the chat in which to count messages |
filter | Filter for message content; searchMessagesFilterEmpty is unsupported in this function | |
returnLocal | boolean | If true, returns count that is available locally without sending network requests, returning -1 if the number of messages is unknown |
Returns
ApiResponse interface:interface ApiResponse {
_: 'getChatMessageCount' | 'error'
airgram: Airgram
request: {
method: 'getChatMessageCount'
params: GetChatMessageCountParams
}
response: |
setState: (nextState: Record<string, unknown>) => void
getState: () => Record<string, unknown>
}