-
Notifications
You must be signed in to change notification settings - Fork 9
TDLib
The Telegram-Client is built on the Telegram Database Library (TDLib) which provides access to the Telegram API via a JSON interface. The library binaries are downloaded automatically when starting TelegramClient for the first time in an image.
We set up a repository that uses GitHub actions to build TDLib. To migrate to a new version, do the following:
- Create a pull request on the tdlib repository and update all version numbers in the build scripts, like here, check that the build is green and merge into master.
- Download the artifacts from the pipeline run on master.
- Create a new release with tag
v1.X.Y
and upload the following release artifacts:-
libtdjson.so.1.X.Y
(Linux) -
libtdjson.1.X.Y.dylib
(MacOS) - zip all four libraries from the
bin/
foldertdlib-1.X.Y.zip
(Windows)
-
- Update
TCCFFIClient>>tdlibVersion
to the new version tag. - Create a PR and run automatic and manual tests on all platforms.
In the last week of the previous iteration, Telegram decided to disable login with the version of TDLib that was currently in use (1.8.0). In order to return to a functional state, it is needed to update to a recent version, which involves refactoring to handle changes in the underlying data structure returned by TDLib. Example GitHub workflows for compiling 1.8.31 can be found here: https://github.com/TebbeUbben/tdlib/tree/main. A good starting point is to modify TCCAuthenticationHandler#setTdlibParams by moving all the elements in the parameters object to the root of the JSON structure. Group13 Swt 2024