Skip to content

Commit 6b83761

Browse files
committed
Update to Telegram API layer 227
- guard_bot - RichText/RichMessage - inviteJoin/joinChatBot - webBrowserSettings/webDomain Exception - BotConnection
1 parent 95be041 commit 6b83761

6 files changed

Lines changed: 878 additions & 150 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[![Latest API Layer](https://img.shields.io/badge/Latest_API_Layer-on_Patreon-darkgreen)](https://www.patreon.com/wizou)
2-
[![API Layer](https://img.shields.io/badge/API_Layer-225-blueviolet)](https://corefork.telegram.org/methods)
2+
[![API Layer](https://img.shields.io/badge/API_Layer-227-blueviolet)](https://corefork.telegram.org/methods)
33
[![NuGet version](https://img.shields.io/nuget/v/WTelegramClient?color=00508F)](https://www.nuget.org/packages/WTelegramClient/)
44
[![NuGet prerelease](https://img.shields.io/nuget/vpre/WTelegramClient?color=C09030&label=dev+nuget)](https://www.nuget.org/packages/WTelegramClient/absoluteLatest)
55
[![Donate](https://img.shields.io/badge/Help_this_project:-Donate-ff4444)](https://buymeacoffee.com/wizou)

src/Client.Helpers.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -822,7 +822,8 @@ public async Task<ChatBase> AnalyzeInviteLink(string url, bool join = false, IDi
822822
try
823823
{
824824
var res = await this.Channels_JoinChannel(channel);
825-
chat = res.Chats[channel.id];
825+
if (res is Messages_ChatInviteJoinResultOk { updates.Chats: { } resChats })
826+
chat = resChats[channel.id];
826827
}
827828
catch (RpcException ex) when (ex.Code == 400 && ex.Message == "INVITE_REQUEST_SENT") { }
828829
return chat;
@@ -832,7 +833,8 @@ public async Task<ChatBase> AnalyzeInviteLink(string url, bool join = false, IDi
832833
try
833834
{
834835
var res = await this.Messages_ImportChatInvite(hash);
835-
if (res.Chats.Values.FirstOrDefault() is ChatBase chat) return chat;
836+
if (res is Messages_ChatInviteJoinResultOk { updates.Chats: { } resChats })
837+
if (resChats.Values.FirstOrDefault() is ChatBase chat) return chat;
836838
}
837839
catch (RpcException ex) when (ex.Code == 400 && ex.Message == "INVITE_REQUEST_SENT") { }
838840
switch (chatInvite)

src/TL.Schema.cs

Lines changed: 581 additions & 57 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)