SearchMessages misses the latest message
Why the SearchMessages method returns one less message than expected. I sent Q1, Q2, Q3. FoundMessages.totalCount = 3, message[Q2, Q1]. If I send a message Q4 FoundMessages.totalCount = 4, message[Q3, Q2, Q1]. If I send a message Q5 FoundMessages.totalCount = 5, message is[Q4, Q3, Q2, Q1]. The problem is not the limits. Can you please tell me how to solve the problem and how the "query" works? I always send a string with a space " ", but if I send an empty string "" it stops matching.
TdApi.FoundMessages foundMessages = client.sendSync(new TdApi.SearchMessages(
new TdApi.ChatListMain(),
" ",
"",
10,
new TdApi.SearchMessagesFilterEmpty(),
null,
0,
0
));
Version: 1.8.50
😂
On Tue, Dec 2, 2025, 4:27 AM babutuhin77-dev @.***> wrote:
babutuhin77-dev left a comment (tdlib/td#3510) https://github.com/tdlib/td/issues/3510#issuecomment-3600007903
1764645972273670474349787062055.jpg (view on web) https://github.com/user-attachments/assets/72f2754c-c234-4e64-8f23-cd8232f25aa0
— Reply to this email directly, view it on GitHub https://github.com/tdlib/td/issues/3510#issuecomment-3600007903, or unsubscribe https://github.com/notifications/unsubscribe-auth/BLBYQ2PXMSFX4VH6WNMBC4D37UBKBAVCNFSM6AAAAACMQOYM3SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTMMBQGAYDOOJQGM . You are receiving this because you are subscribed to this thread.Message ID: @.***>
@
Are you ready to transfer
On Tue, Dec 2, 2025, 4:39 AM babutuhin77-dev @.***> wrote:
babutuhin77-dev left a comment (tdlib/td#3510) https://github.com/tdlib/td/issues/3510#issuecomment-3600034166
@
— Reply to this email directly, view it on GitHub https://github.com/tdlib/td/issues/3510#issuecomment-3600034166, or unsubscribe https://github.com/notifications/unsubscribe-auth/BLBYQ2LS2WKPAX7BTJNERO337UCVJAVCNFSM6AAAAACMQOYM3SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTMMBQGAZTIMJWGY . You are receiving this because you commented.Message ID: @.***>
TDLib will never send to the app too new messages that are newer than the newest known message in the chat. You will receive the messages through updateNewMessage first when the chat state is updated, which is supposed to happen soon after.
Also, searchMessages is not supposed to be used to get all messages. New messages are received through updateNewMessage updates. You can also receive messages within specific chat using getChatHistory.