td icon indicating copy to clipboard operation
td copied to clipboard

messageForwardOriginChannel, messageForwardOriginUser disappeared...

Open UnitedMarsupials opened this issue 8 months ago • 3 comments

Trying to build tdlib-purple -- the Pidgin plugin for Telegram, that's using tdlib -- I now get errors about various types no longer found in the td::td_api namespace:

  • messageForwardOriginChannel
  • messageForwardOriginUser

Other things are missing too:

..../tdlib-purple-0.8.1/td-client.cpp:246:22: error: no member named 'authorizationStateWaitEncryptionKey' in namespace 'td::td_api'; did you mean 'authorizationStateWaitEmailCode'?
  246 |     case td::td_api::authorizationStateWaitEncryptionKey::ID:
      |          ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                      authorizationStateWaitEmailCode
/opt/include/td/telegram/td_api.h:2037:7: note: 'authorizationStateWaitEmailCode' declared here
 2037 | class authorizationStateWaitEmailCode final : public AuthorizationState {
      |       ^
..../tdlib-purple-0.8.1/td-client.cpp:248:69: error: no member named 'checkDatabaseEncryptionKey' in namespace 'td::td_api'
  248 |         m_transceiver.sendQuery(td::td_api::make_object<td::td_api::checkDatabaseEncryptionKey>(""),
      |                                                         ~~~~~~~~~~~~^
..../tdlib-purple-0.8.1/td-client.cpp:378:31: error: no type named 'tdlibParameters' in namespace 'td::td_api'; did you mean 'setTdlibParameters'?
  378 | static void stuff(td::td_api::tdlibParameters &parameters)
      |                   ~~~~~~~~~~~~^~~~~~~~~~~~~~~
      |                               setTdlibParameters
...

First, the obvious observation -- the API-changes appear too drastic for a micro-version upgrade. Going from 1.8.0 to 1.8.4 shouldn't have broken things -- if the changes are necessary and useful, this should've become 1.9.0 or even 2.0.0.

And now, what are we -- maintainers of tdlib-using code -- to do? The messageForwardOriginUser-class is still documented by Telegram, for example. Do we need to change the depending software (how?), or wait for you to fix (what seems like) the regressions?

UnitedMarsupials avatar May 14 '25 00:05 UnitedMarsupials

Despite the JSON interface is stable and binary compatible between all minor versions, the underlying JSON API changes in every minor version. You can find all API changes between the used version and the target version by examining diff of the file https://github.com/tdlib/td/blob/master/td/generate/scheme/td_api.tl. There were definitely a lot of changes in the API since 1.8.0, including changes in the classes mentioned above.

levlam avatar May 14 '25 08:05 levlam

the underlying JSON API changes in every minor version

But not the micro version, does it? Should it?

There were definitely a lot of changes in the API since 1.8.0, including changes in the classes mentioned above

So, the messageForwardOriginUser-class no longer exists, even if still documented by Telegram?

UnitedMarsupials avatar May 14 '25 15:05 UnitedMarsupials

But not the micro version, does it? Should it?

Telegram has 1-3 monthly updates with multiple changes, and so does TDLib API.

The mentioned link to the class messageForwardOriginUser was unreachable from the up-to-date documentation https://core.telegram.org/tdlib/docs/. The direct link doesn't work anymore also.

levlam avatar May 14 '25 18:05 levlam