libtd-ktx / kotlinx.telegram.coroutines / getChatMessageCount
getChatMessageCount
suspend fun
TelegramFlow
.getChatMessageCount(chatId:
Long
, filter:
SearchMessagesFilter
?, returnLocal:
Boolean
):
Count
Suspend function, which returns approximate number of messages of the specified type in the chat.
Parameters
chatId
- Identifier of the chat in which to count messages.
filter
- Filter for message content; searchMessagesFilterEmpty is unsupported in this
function.
returnLocal
- If true, returns count that is available locally without sending network
requests, returning -1 if the number of messages is unknown.
Return Count Contains a counter.