diff --git a/.github/dev.yml b/.github/dev.yml index 691c3e1..adf45c2 100644 --- a/.github/dev.yml +++ b/.github/dev.yml @@ -2,7 +2,7 @@ pr: none trigger: - master -name: 3.0.0-dev.$(Rev:r) +name: 3.0.1-dev.$(Rev:r) pool: vmImage: ubuntu-latest diff --git a/.github/release.yml b/.github/release.yml index de94957..9a0e1a8 100644 --- a/.github/release.yml +++ b/.github/release.yml @@ -1,7 +1,7 @@ pr: none trigger: none -name: 3.0.0 +name: 3.0.$(Rev:r) pool: vmImage: ubuntu-latest diff --git a/FAQ.md b/FAQ.md index 918c4a8..2093458 100644 --- a/FAQ.md +++ b/FAQ.md @@ -43,7 +43,7 @@ This might require adding a reference *(and `using`)* to the Microsoft.VisualBas A more complex solution requires the use of a `ManualResetEventSlim` that you will wait for in Config callback, and when the user has provided the verification_code through your app, you "set" the event to release your Config callback so it can return the code. -Another solution is to use the [alternative login method](README.md#alternative-simplified-configuration-login), +Another solution is to use the [alternative login method](README.md#alternative-simplified-configuration--login), calling `client.Login(...)` as the user provides the requested configuration elements. You can download such full example apps [for WinForms](https://github.com/wiz0u/WTelegramClient/raw/master/Examples/WinForms_app.zip) and [for ASP.NET](https://github.com/wiz0u/WTelegramClient/raw/master/Examples/ASPnet_webapp.zip) diff --git a/README.md b/README.md index 1447856..ef4c92e 100644 --- a/README.md +++ b/README.md @@ -97,13 +97,13 @@ await DoLogin("+12025550156"); async Task DoLogin(string loginInfo) // add this method to your code { while (client.User == null) - switch (await client.Login(loginInfo)) // returns which configuration info is requested for the login to continue - { - case "verification_code": Console.Write("Code: "); loginInfo = Console.ReadLine(); break; - case "name": loginInfo = "John Doe"; break; // if sign-up is required (first_name + last_name) - case "password": loginInfo = "secret!"; break; // if user has enabled 2FA - default: loginInfo = null; break; - } + switch (await client.Login(loginInfo)) // returns which configuration info is requested for the login to continue + { + case "verification_code": Console.Write("Code: "); loginInfo = Console.ReadLine(); break; + case "name": loginInfo = "John Doe"; break; // if sign-up is required (first_name + last_name) + case "password": loginInfo = "secret!"; break; // if user has enabled 2FA + default: loginInfo = null; break; + } Console.WriteLine($"We are logged-in as {client.User} (id {client.User.id})"); } ```