Skip to content

Commit

Permalink
Use fixed phone number + DC
Browse files Browse the repository at this point in the history
  • Loading branch information
rgwohlbold committed May 11, 2022
1 parent 73bd3d0 commit 3806afc
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ loginWithTestData
"See https://core.telegram.org/api/auth#test-phone-numbers. Choose random numbers to bypass flood limits."
| phoneNumber testX testYYYY |

testX := ($1 to: $3) atRandom.
testYYYY := ((1 to: 4) collect: [:i | ($0 to: $9) atRandom]) join.
testX := $3. "($1 to: $3) atRandom"
testYYYY := '1234'. "((1 to: 4) collect: [:i | ($0 to: $9) atRandom]) join"
phoneNumber := '99966' , testX , testYYYY.

self authenticationHandler sendPhoneNumber: phoneNumber.
[self authenticationHandler isAwaitingAuthCode] whileFalse: [1 second wait.].
self checkAuthenticationCode: (String new: 5 withAll: testX).
self checkAuthenticationCode: (String new: 5 withAll: testX).

0 comments on commit 3806afc

Please sign in to comment.