mirror of
https://github.com/wiz0u/WTelegramClient.git
synced 2025-12-06 06:52:01 +01:00
minor changes
This commit is contained in:
parent
6aef50db85
commit
33a2fb02c1
Binary file not shown.
|
|
@ -23,7 +23,7 @@ namespace WTelegramClientTest
|
||||||
Client.Update += Client_Update;
|
Client.Update += Client_Update;
|
||||||
My = await Client.LoginUserIfNeeded();
|
My = await Client.LoginUserIfNeeded();
|
||||||
Users[My.id] = My;
|
Users[My.id] = My;
|
||||||
// Note that on login Telegram may sends a bunch of updates/messages that happened in the past and were not acknowledged
|
// Note: on login, Telegram may sends a bunch of updates/messages that happened in the past and were not acknowledged
|
||||||
Console.WriteLine($"We are logged-in as {My.username ?? My.first_name + " " + My.last_name} (id {My.id})");
|
Console.WriteLine($"We are logged-in as {My.username ?? My.first_name + " " + My.last_name} (id {My.id})");
|
||||||
// We collect all infos about the users/chats so that updates can be printed with their names
|
// We collect all infos about the users/chats so that updates can be printed with their names
|
||||||
var dialogs = await Client.Messages_GetAllDialogs(); // dialogs = groups/channels/users
|
var dialogs = await Client.Messages_GetAllDialogs(); // dialogs = groups/channels/users
|
||||||
|
|
|
||||||
Binary file not shown.
2
FAQ.md
2
FAQ.md
|
|
@ -210,7 +210,7 @@ In particular, it will detect and handle automatically and properly the various
|
||||||
* 2FA password required (your Config needs to provide "password")
|
* 2FA password required (your Config needs to provide "password")
|
||||||
* Account registration/sign-up required (your Config needs to provide "first_name", "last_name")
|
* Account registration/sign-up required (your Config needs to provide "first_name", "last_name")
|
||||||
* Request to resend the verification code through alternate ways like SMS (if your Config answer an empty "verification_code" initially)
|
* Request to resend the verification code through alternate ways like SMS (if your Config answer an empty "verification_code" initially)
|
||||||
* Transient failures, slowness to respond, checks for encryption key safety, etc..
|
* Transient failures, slowness to respond, wrong code/password, checks for encryption key safety, etc..
|
||||||
|
|
||||||
Contrary to TLSharp, WTelegramClient supports MTProto v2.0 (more secured), transport obfuscation, protocol security checks, MTProto Proxy, real-time updates, multiple DC connections, API documentation in Intellisense...
|
Contrary to TLSharp, WTelegramClient supports MTProto v2.0 (more secured), transport obfuscation, protocol security checks, MTProto Proxy, real-time updates, multiple DC connections, API documentation in Intellisense...
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ namespace WTelegram
|
||||||
{
|
{
|
||||||
public partial class Client : IDisposable
|
public partial class Client : IDisposable
|
||||||
{
|
{
|
||||||
/// <summary>This event will be called when an unsollicited update/message is sent by Telegram servers</summary>
|
/// <summary>This event will be called when unsollicited updates/messages are sent by Telegram servers</summary>
|
||||||
/// <remarks>See <see href="https://github.com/wiz0u/WTelegramClient/tree/master/Examples/Program_ListenUpdate.cs">Examples/Program_ListenUpdate.cs</see> for how to use this</remarks>
|
/// <remarks>See <see href="https://github.com/wiz0u/WTelegramClient/tree/master/Examples/Program_ListenUpdate.cs">Examples/Program_ListenUpdate.cs</see> for how to use this</remarks>
|
||||||
public event Action<IObject> Update;
|
public event Action<IObject> Update;
|
||||||
/// <summary>Used to create a TcpClient connected to the given address/port, or throw an exception on failure</summary>
|
/// <summary>Used to create a TcpClient connected to the given address/port, or throw an exception on failure</summary>
|
||||||
|
|
@ -322,8 +322,8 @@ namespace WTelegram
|
||||||
// TODO: implement an Updates gaps handling system? https://core.telegram.org/api/updates
|
// TODO: implement an Updates gaps handling system? https://core.telegram.org/api/updates
|
||||||
if (IsMainDC)
|
if (IsMainDC)
|
||||||
{
|
{
|
||||||
var udpatesState = await this.Updates_GetState(); // this call reenables incoming Updates
|
var updatesState = await this.Updates_GetState(); // this call reenables incoming Updates
|
||||||
OnUpdate(udpatesState);
|
OnUpdate(updatesState);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -669,7 +669,7 @@ namespace WTelegram
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Helpers.Log(4, $"Update callback on {obj.GetType().Name} raised {ex}");
|
Helpers.Log(4, $"{nameof(Update)} callback on {obj.GetType().Name} raised {ex}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue