How to cancel Client.send in Tdlib?

306 views Asked by At

I'm writing Telegram authentication via Tdlib and have found that library handles retries internally (e.g. when I'm trying to send phone number to start authentication and connection is poor/missing library would schedule pause-n-retry internally).

The problem is that I can't stop it or at least change retry policy. Neither I was able to send the same request again if it was scheduled for retry.

Any ideas how to get over this?

1

There are 1 answers

0
Roman Chumachenko On BEST ANSWER

So apparently the answer is to send TdApi.ResendAuthenticationCode. Other available resend actions are:

  • TdApi.ResendChangePhoneNumberCode
  • TdApi.ResendEmailAddressVerificationCode
  • TdApi.ResendMessages
  • TdApi.ResendPhoneNumberConfirmationCode
  • TdApi.ResendPhoneNumberVerificationCode
  • TdApi.ResendRecoveryEmailAddressCode