mirror of
https://github.com/wiz0u/WTelegramClient.git
synced 2025-12-06 06:52:01 +01:00
Removed unused _sem in Session
This commit is contained in:
parent
c3dcd2a367
commit
a473475e11
|
|
@ -25,7 +25,7 @@ await client.LoginUserIfNeeded();
|
|||
var imported = await client.Contacts_ImportContacts(new[] { new InputPhoneContact { phone = "+PHONENUMBER" } });
|
||||
await client.SendMessageAsync(imported.users[0], "Hello!");
|
||||
```
|
||||
### Get the list of all chats (groups/channels) the user is in and send a message to one
|
||||
### List all chats (groups/channels) the user is in and send a message to one
|
||||
|
||||
See [Examples/Program_GetAllChats.cs](Examples/Program_GetAllChats.cs)
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ After installing WTelegramClient through Nuget, your first Console program will
|
|||
static async Task Main(string[] _)
|
||||
{
|
||||
using var client = new WTelegram.Client();
|
||||
await client.ConnectAsync();
|
||||
var user = await client.LoginUserIfNeeded();
|
||||
Console.WriteLine($"We are logged-in as {user.username ?? user.first_name + " " + user.last_name} (id {user.id})");
|
||||
}
|
||||
|
|
@ -97,9 +96,9 @@ Console.WriteLine($"Sending a message in chat {target.ID}: {target.Title}");
|
|||
await client.SendMessageAsync(target, "Hello, World");
|
||||
```
|
||||
|
||||
### Terminology in Telegram Client API
|
||||
# Terminology in Telegram Client API
|
||||
|
||||
Some of these terms/classnames can be confusing as they differ from the terms shown to end-users
|
||||
In the API, Telegram uses some terms/classnames that can be confusing as they differ from the terms shown to end-users:
|
||||
- `Channel` : A (large) chat group *(sometimes called supergroup)* or a broadcast channel (the `broadcast` flag differenciate those)
|
||||
- `Chat` : A private simple chat group with few people (it may be migrated to a supergroup/channel when it doesn't fit anymore)
|
||||
- Chats : In plural, it means either `Chat` or `Channel`
|
||||
|
|
@ -129,7 +128,7 @@ This library works best with **.NET 5.0+** and is also available for **.NET Stan
|
|||
# Troubleshooting guide
|
||||
|
||||
Here is a list of common issues and how to fix them so that your program work correctly:
|
||||
1) Are you using the Nuget package instead of the library source code?
|
||||
1) Are you using the Nuget package or the library source code?
|
||||
<br/>It is not recommended to copy/compile the source code of the library for a normal usage.
|
||||
<br/>When built in DEBUG mode, the source code connects to Telegram test servers. So you can either:
|
||||
- **Recommended:** Use the [official Nuget package](https://www.nuget.org/packages/WTelegramClient) or the [private nuget feed of development builds](https://dev.azure.com/wiz0u/WTelegramClient/_packaging?_a=package&feed=WTelegramClient&package=WTelegramClient&protocolType=NuGet)
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@ namespace WTelegram
|
|||
}
|
||||
|
||||
public DateTime SessionStart => _sessionStart;
|
||||
public readonly SemaphoreSlim _sem = new(1);
|
||||
private readonly DateTime _sessionStart = DateTime.UtcNow;
|
||||
private readonly SHA256 _sha256 = SHA256.Create();
|
||||
private string _pathname;
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
<PublishRepositoryUrl>true</PublishRepositoryUrl>
|
||||
<EmbedUntrackedSources>true</EmbedUntrackedSources>
|
||||
<PackageId>WTelegramClient</PackageId>
|
||||
<Description>Telegram client library written 100% in C# and .NET Standard | Latest MTProto & API layer version</Description>
|
||||
<Description>Telegram Client API library written 100% in C# and .NET Standard | Latest MTProto & API layer version</Description>
|
||||
<Authors>Wizou</Authors>
|
||||
<Copyright>Copyright © Olivier Marcoux 2021</Copyright>
|
||||
<PackageIcon>logo.png</PackageIcon>
|
||||
|
|
|
|||
Loading…
Reference in a new issue