You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have response of type object_ptr< messages > in callback response->total_count_ equals to 5 (it's correct, I checked with Telegram Desktop), but response->messages.size() equals to 1 and contains only newest message with document from chat.
I tried to change limit/offset, but no luck.
How can I retrieve all messages with documents?
The text was updated successfully, but these errors were encountered:
It is desired (and documented) behavior. From the parameter limit description: "Fewer messages may be returned than specified by the limit, even if the end of the message history has not been reached".
In order to get more messages, you should call again searchChatMessages with from_message_id equal to message identifier of the last received message.
Offset should be always 0, if you retrieving messages from oldest to newest.
I tried to retrieve all messages with documents by using filter
searchMessagesFilterDocument
.I have response of type
object_ptr< messages >
in callbackresponse->total_count_
equals to5
(it's correct, I checked with Telegram Desktop), butresponse->messages.size()
equals to1
and contains only newest message with document from chat.I tried to change limit/offset, but no luck.
How can I retrieve all messages with documents?
The text was updated successfully, but these errors were encountered: