southbridgeio / tdlib-ruby

Ruby bindings and client for TDLib
MIT License
94 stars 45 forks source link

What version of tdlib is exactly needed? #24

Closed bodqhrohro closed 5 years ago

bodqhrohro commented 5 years ago

I tried to build 1.3.6 revision and got an error after a client was connected:

[ 0][t 1][1565432343.586966515][LogEvent.h:207][!NetStatsManager][&version() < static_cast<int32>(Version::Next)]       Wrong version 19

Does tdlib-ruby need an earlier revision?

snoopcatt commented 5 years ago

Yes, it depends on tdlib==1.3

nsauk commented 5 years ago

@snoopcatt This mean I need to use code with v1.3.0 tag from tdlib/td repo? I've compiled two versions of libtdjson.so (1.3.0 and latest, 1.5.0), and both doesn't works properly with tdlib-ruby 2.0. On 1.3.0 I have application fails with description "Wrong version 22", on 1.5.0 I have timeout errors in async code (although log contains requests and responses as if all ok).

nsauk commented 5 years ago

Just contacted the developer of typeization and together we reached an understanding of the problem.

  1. Currently Telegram servers blocks requests with old TDLib versions. TDLib 1.5.0 should be used.
  2. This version of gem will be work after re-generating of TL-classes, see #14 and file td_api_tl_parser.rb from commit. Also some manual fix after regeneration is required (you will see it as syntax error after trying to require).

I hope this change will be added as PR soon.

bdevel commented 5 years ago

I created PR #25 which replaces tdslib support for v1.5. I don't have an application to test the new methods but authentication works fine.

This change will require a new gem release which I'll leave to the maintainer.

vladislav-yashin commented 5 years ago

2.1.0 released with support for tdlib 1.5.0 Thanks @bdevel