tdlib / td

Cross-platform library for building Telegram clients
https://core.telegram.org/tdlib
Boost Software License 1.0
7.11k stars 1.44k forks source link

searchChatMessages not updating when uploading file #2638

Closed thom-gg closed 1 year ago

thom-gg commented 1 year ago

Hi ! I listen to events like new message or delete message, and when I detect one of the two, I re-call my function that makes an api call with the 'searchChatMessages' method, to get the list of messages.

My issue is, when deleting messages it works, my new call to the api return me a list of message without the one I just deleted (as it should). But when I send a new message, my api result returns the same list as before, like if it didnt understand I sent a new message already (even tho I can see it on telegram official client). After waiting a few minutes, it ends up loading the message. Any ideas ? image (I am far from the limit of 50 messages)

EDIT: I still dont know why it was happening, but removing the query field of my api call fixes it. So i'll just get all messages and then filter them myself instead of querying it