Released 3.0.0

This commit is contained in:
Wizou 2022-10-08 15:49:11 +02:00
parent 3fdc7bc1ad
commit 9c14a17af1
4 changed files with 10 additions and 10 deletions

2
.github/dev.yml vendored
View file

@ -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

2
.github/release.yml vendored
View file

@ -1,7 +1,7 @@
pr: none
trigger: none
name: 3.0.0
name: 3.0.$(Rev:r)
pool:
vmImage: ubuntu-latest

2
FAQ.md
View file

@ -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)

View file

@ -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})");
}
```