td icon indicating copy to clipboard operation
td copied to clipboard

TdLib Upgrade Questions

Open pranavkulkarni7 opened this issue 1 year ago • 2 comments

Hello, I am using 1.8.23 and want to upgrade to recent version. I have a few questions related to same:

  1. I can see 1.8.36 is created two weeks back. Is it safe to use it and is it production ready?
  2. There are some changes in some of the models:
  • TdApi.Message.forwardInfo.fromChatId is not available - can we replace it MessageForwardInfo.ForwardSource.chatId ?
  • FormattedText.webPage is not available it was referring to TdApi.WebPage. How can we get webpage from message content ?
  • TdApi.SetTdlibParameters had enableStorageOptimizer, which is not present now, is their any replacement for this? I was setting it as true.
  1. Any other changes I should be aware of?

pranavkulkarni7 avatar Sep 23 '24 17:09 pranavkulkarni7

I can see 1.8.36 is created two weeks back. Is it safe to use it and is it production ready?

Yes, all TDLib versions pushed to Github are production-ready.

TdApi.Message.forwardInfo.fromChatId is not available - can we replace it MessageForwardInfo.ForwardSource.chatId ?

Yes. Now ForwardSource contains information about the message, from which the message was forwarded last time if it is available.

FormattedText.webPage is not available it was referring to TdApi.WebPage. How can we get webpage from message content ?

The class was renamed to linkPreview and now can be of many strict types. The corresponding field is located in the class messageText.

TdApi.SetTdlibParameters had enableStorageOptimizer, which is not present now, is their any replacement for this? I was setting it as true

Set the option "use_storage_optimizer" instead before calling setTdlibParameters.

Any other changes I should be aware of?

There were much more changes since 1.8.23. The best way to find all of them is to use git diff <old_commit_hash> td/generate/scheme/td_api.tl. Also, see https://core.telegram.org/tdlib/options for new options.

levlam avatar Sep 23 '24 17:09 levlam

Thanks! Let me try this.

pranavkulkarni7 avatar Sep 23 '24 18:09 pranavkulkarni7