diff --git a/src/Client.Helpers.cs b/src/Client.Helpers.cs
index 3870a2f..0303d72 100644
--- a/src/Client.Helpers.cs
+++ b/src/Client.Helpers.cs
@@ -620,7 +620,7 @@ namespace WTelegram
chats = (await this.Messages_GetChats(chat.chat_id)).chats };
case InputPeerChannel channel:
return await this.Channels_EditAdmin(channel, user,
- new ChatAdminRights { flags = is_admin ? (ChatAdminRights.Flags)0x8BF : 0 }, null);
+ new ChatAdminRights { flags = is_admin ? (ChatAdminRights.Flags)0x1E8BF : 0 }, null);
default:
throw new ArgumentException(OnlyChatChannel);
}
diff --git a/src/Client.cs b/src/Client.cs
index 6572d5c..763c977 100644
--- a/src/Client.cs
+++ b/src/Client.cs
@@ -366,7 +366,7 @@ namespace WTelegram
lock (_pendingRpcs) // abort all pending requests
{
foreach (var rpc in _pendingRpcs.Values)
- rpc.tcs.SetException(ex);
+ rpc.tcs.TrySetException(ex);
_pendingRpcs.Clear();
_bareRpc = null;
}
@@ -879,9 +879,9 @@ namespace WTelegram
if (defaultDc != 0) _dcSession ??= _session.DCSessions.GetValueOrDefault(defaultDc);
_dcSession ??= new() { Id = Helpers.RandomLong() };
_dcSession.Client = this;
+ _dcSession.DataCenter = null;
Helpers.Log(2, $"Connecting to {endpoint}...");
tcpClient = await TcpHandler(endpoint.Address.ToString(), endpoint.Port);
- _dcSession.DataCenter = null;
}
}
}
diff --git a/src/WTelegramClient.csproj b/src/WTelegramClient.csproj
index e2acf39..f4dedc4 100644
--- a/src/WTelegramClient.csproj
+++ b/src/WTelegramClient.csproj
@@ -16,7 +16,7 @@
Telegram Client API (MTProto) library written 100% in C# and .NET Standard | Latest API layer: 179
Release Notes:
$(ReleaseNotes.Replace("|", "%0D%0A").Replace(" - ","%0D%0A- ").Replace(" ", "%0D%0A%0D%0A"))
Copyright © Olivier Marcoux 2021-2024
MIT
- https://github.com/wiz0u/WTelegramClient
+ https://wiz0u.github.io/WTelegramClient
logo.png
true
https://github.com/wiz0u/WTelegramClient.git