diff --git a/README.md b/README.md index 838b958..089b923 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![API Layer](https://img.shields.io/badge/API_Layer-206-blueviolet)](https://corefork.telegram.org/methods) +[![API Layer](https://img.shields.io/badge/API_Layer-207-blueviolet)](https://corefork.telegram.org/methods) [![NuGet version](https://img.shields.io/nuget/v/WTelegramClient?color=00508F)](https://www.nuget.org/packages/WTelegramClient/) [![NuGet prerelease](https://img.shields.io/nuget/vpre/WTelegramClient?color=C09030&label=dev+nuget)](https://www.nuget.org/packages/WTelegramClient/absoluteLatest) [![Donate](https://img.shields.io/badge/Help_this_project:-Donate-ff4444)](https://buymeacoffee.com/wizou) diff --git a/src/TL.Schema.cs b/src/TL.Schema.cs index da22aff..d7f3678 100644 --- a/src/TL.Schema.cs +++ b/src/TL.Schema.cs @@ -20050,9 +20050,10 @@ namespace TL /// For limited-supply gifts: the total number of gifts that was available in the initial supply. public virtual int AvailabilityTotal => default; public virtual string Title => default; + public virtual Peer ReleasedBy => default; } /// Represents a star gift, see here » for more info. See - [TLDef(0xC62ACA28)] + [TLDef(0x7F853C12)] public sealed partial class StarGift : StarGiftBase { /// Extra bits of information, use flags.HasFlag(...) to test for those @@ -20077,6 +20078,7 @@ namespace TL [IfFlag(3)] public long upgrade_stars; [IfFlag(4)] public long resell_min_stars; [IfFlag(5)] public string title; + [IfFlag(6)] public Peer released_by; [Flags] public enum Flags : uint { @@ -20092,6 +20094,8 @@ namespace TL has_availability_resale = 0x10, /// Field has a value has_title = 0x20, + /// Field has a value + has_released_by = 0x40, } /// Identifier of the gift @@ -20099,9 +20103,10 @@ namespace TL /// For limited-supply gifts: the total number of gifts that was available in the initial supply. public override int AvailabilityTotal => availability_total; public override string Title => title; + public override Peer ReleasedBy => released_by; } /// See - [TLDef(0x6411DB89)] + [TLDef(0xF63778AE)] public sealed partial class StarGiftUnique : StarGiftBase { public Flags flags; @@ -20117,6 +20122,7 @@ namespace TL public int availability_total; [IfFlag(3)] public string gift_address; [IfFlag(4)] public long resell_stars; + [IfFlag(5)] public Peer released_by; [Flags] public enum Flags : uint { @@ -20125,22 +20131,28 @@ namespace TL has_owner_address = 0x4, has_gift_address = 0x8, has_resell_stars = 0x10, + has_released_by = 0x20, } public override long ID => id; public override int AvailabilityTotal => availability_total; public override string Title => title; + public override Peer ReleasedBy => released_by; } /// Available gifts ». See /// a value means payments.starGiftsNotModified - [TLDef(0x901689EA)] - public sealed partial class Payments_StarGifts : IObject + [TLDef(0x2ED82995)] + public sealed partial class Payments_StarGifts : IObject, IPeerResolver { /// Hash used for caching, for more info click here public int hash; /// List of available gifts. public StarGiftBase[] gifts; + public Dictionary chats; + public Dictionary users; + /// returns a or for the given Peer + public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } /// Report menu option See diff --git a/src/TL.Table.cs b/src/TL.Table.cs index 11bbf49..bbb604f 100644 --- a/src/TL.Table.cs +++ b/src/TL.Table.cs @@ -6,7 +6,7 @@ namespace TL { public static partial class Layer { - public const int Version = 206; // fetched 02/07/2025 12:40:29 + public const int Version = 207; // fetched 08/07/2025 17:40:58 internal const int SecretChats = 144; internal const int MTProto2 = 73; internal const uint VectorCtor = 0x1CB5C415; @@ -1361,10 +1361,10 @@ namespace TL [0x4BA3A95A] = typeof(MessageReactor), [0x94CE852A] = typeof(StarsGiveawayOption), [0x54236209] = typeof(StarsGiveawayWinnersOption), - [0xC62ACA28] = typeof(StarGift), - [0x6411DB89] = typeof(StarGiftUnique), + [0x7F853C12] = typeof(StarGift), + [0xF63778AE] = typeof(StarGiftUnique), [0xA388A368] = null,//Payments_StarGiftsNotModified - [0x901689EA] = typeof(Payments_StarGifts), + [0x2ED82995] = typeof(Payments_StarGifts), [0x7903E3D9] = typeof(MessageReportOption), [0xF0E4E0B6] = typeof(ReportResultChooseOption), [0x6F09AC31] = typeof(ReportResultAddComment), diff --git a/src/WTelegramClient.csproj b/src/WTelegramClient.csproj index 8024098..3d55ae8 100644 --- a/src/WTelegramClient.csproj +++ b/src/WTelegramClient.csproj @@ -13,8 +13,8 @@ WTelegramClient Wizou 0.0.0 - layer.206 - Telegram Client API (MTProto) library written 100% in C# and .NET Standard | Latest API layer: 206 + layer.207 + Telegram Client API (MTProto) library written 100% in C# and .NET Standard | Latest API layer: 207 Release Notes: $(ReleaseNotes.Replace("|", "%0D%0A").Replace(" - ","%0D%0A- ").Replace(" ", "%0D%0A%0D%0A"))