captcha
captcha

Reputation: 1

tdlib-ruby Telegram API returns Error timed out

I was trying to set up a web client for telegram using ruby. I registered for telegram application and obtained api_id and api_hash keys. Then I am using tdlib with the help of https://github.com/southbridgeio/tdlib-ruby. Each method call returns promise object and when checked for reason, shows - <TD::Types::Error code=0 message="Timeout error">. I'm not sure what is wrong. Any help would be appreciated.

Upvotes: 0

Views: 553

Answers (1)

Nikita Misharin
Nikita Misharin

Reputation: 2030

Had similar problem. You need to connect first. For example:

client = TD::Client.new
client.connect.then do
    client.join_chat(chat_id)
end

Or

client = TD::Client.new
client.connect.wait
client.join_chat(chat_id).wait

Upvotes: 0

Related Questions