Describe the bug
If auth.sendCode is called per the documentation, the settings object does not have a parameter '_'.
The auth.sendCode logic can be found below. The problematic line appears to be this.predicate(params.settings), where the predicate tries to call builderMap[settings._].call(), and the settings object does not work because the resulting function is undefined.
If I remove the problematic line this.predicate(params.settings), I get a 400 error from the API.
Describe the bug If auth.sendCode is called per the documentation, the settings object does not have a parameter '_'.
The
auth.sendCode
logic can be found below. The problematic line appears to bethis.predicate(params.settings)
, where the predicate tries to callbuilderMap[settings._].call()
, and the settings object does not work because the resulting function is undefined.If I remove the problematic line
this.predicate(params.settings)
, I get a 400 error from the API.Code example
Expected behavior To receive an SMS or Telegram message with the phone code
Context: NodeJS 15.14.0 @mtproto/core 6.0.1