Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lattenwald committed Dec 1, 2021
1 parent 24bc0a5 commit 9c0f570
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions src/tdlib.erl
Original file line number Diff line number Diff line change
Expand Up @@ -434,16 +434,20 @@ handle_cast(
{phone_number, PhoneNumber},
State = #state{auth_state = <<"authorizationStateWaitPhoneNumber">>}
) ->
Settings = method(<<"phoneNumberAuthenticationSettings">>,
[{<<"allow_flash_call">>, false},
{<<"is_current_phone_number">>, false},
{<<"allow_sms_retriever_api">>, false}]),
send(
self(),
method(
<<"setAuthenticationPhoneNumber">>,
[
{<<"phone_number">>, PhoneNumber},
{<<"allow_flash_call">>, false}
]
)
),
self(),
method(
<<"setAuthenticationPhoneNumber">>,
[
{<<"phone_number">>, PhoneNumber},
{<<"settings">>, Settings}
]
)
),
{noreply, State};
handle_cast({auth_code, Code}, State = #state{auth_state = <<"authorizationStateWaitCode">>}) ->
send(self(), method(<<"checkAuthenticationCode">>, [{<<"code">>, Code}])),
Expand Down

0 comments on commit 9c0f570

Please sign in to comment.