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

Tdlib version 1.8.34 error `400 Chat not found` #3010

Closed tinau29 closed 2 months ago

tinau29 commented 2 months ago

I'm using the Go programming language with the GoFiber framework. I have an issue sending Telegram messages with tdlib version 1.8.34 (The production server has been updated to version 1.8.34 or latest version) In the previous version 1.8.33, there were no issues (in local development) The problem occurs when the server is freshly running and already authenticated (using phone number and input code), and then sending a message results in a 400 Chat not found error. However, if there has already been interaction between the sending phone number (registered on my.telegram.org) and the receiver, this issue does not occur (making the issue identical to the message sending feature from a chatbot).

It would be best to create version tags for each update and inform users about what has been updated. This way, users of the library can know what needs to be improved (in their code) based on the updates from the library they are using in their project. So, if users do not want to update to the latest version, they can still use the previous version. Since I use CI/CD in my project with the command RUN git clone https://github.com/tdlib/td.git, it always pulls the latest version each time I update my project. If I use a stable version, it is quite outdated compared to the updates (version 1.8.0 Dec 29, 2021).

Is there a way for me to still use tdlib version 1.8.33 ?

levlam commented 2 months ago

Everything works as intended in TDLib 1.8.34 and it works exactly the same as in any previous TDLib version. You must never use hardcoded identifiers with TDLib. You can only pass in requests identifiers that were previously received from the same TDLib instance. Apps are supposed to store nothing on their side. If you want to use a chat, then it must be received first from TDLib in exactly the same way you would have received it in any other Telegram app.

tinau29 commented 2 months ago

ok , thank u