From 75f5832ef62ada28b9b949bee878a685904d4958 Mon Sep 17 00:00:00 2001
From: Wizou <11647984+wiz0u@users.noreply.github.com>
Date: Tue, 15 Oct 2024 17:01:14 +0200
Subject: [PATCH] API Layer 190: Text attached to gifts
---
README.md | 2 +-
src/TL.Schema.cs | 15 ++++++++++++---
src/TL.Table.cs | 8 ++++----
src/WTelegramClient.csproj | 2 +-
4 files changed, 18 insertions(+), 9 deletions(-)
diff --git a/README.md b/README.md
index db8cbd9..e9b8fab 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-[](https://corefork.telegram.org/methods)
+[](https://corefork.telegram.org/methods)
[](https://www.nuget.org/packages/WTelegramClient/)
[](https://www.nuget.org/packages/WTelegramClient/absoluteLatest)
[](https://buymeacoffee.com/wizou)
diff --git a/src/TL.Schema.cs b/src/TL.Schema.cs
index f510d62..657ae47 100644
--- a/src/TL.Schema.cs
+++ b/src/TL.Schema.cs
@@ -2541,7 +2541,7 @@ namespace TL
public string text;
}
/// Info about a gifted Telegram Premium subscription See
- [TLDef(0xC83D6AEC)]
+ [TLDef(0x6C6274FA)]
public sealed partial class MessageActionGiftPremium : MessageAction
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
@@ -2556,11 +2556,14 @@ namespace TL
[IfFlag(0)] public string crypto_currency;
/// If the gift was bought using a cryptocurrency, price of the gift in the smallest units of a cryptocurrency.
[IfFlag(0)] public long crypto_amount;
+ [IfFlag(1)] public TextWithEntities message;
[Flags] public enum Flags : uint
{
/// Fields and have a value
has_crypto_currency = 0x1,
+ /// Field has a value
+ has_message = 0x2,
}
}
/// A forum topic was created. See
@@ -2643,7 +2646,7 @@ namespace TL
}
}
/// Contains a Telegram Premium giftcode link. See
- [TLDef(0x678C2E09)]
+ [TLDef(0x56D03994)]
public sealed partial class MessageActionGiftCode : MessageAction
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
@@ -2662,6 +2665,7 @@ namespace TL
[IfFlag(3)] public string crypto_currency;
/// If crypto_currency is set, contains the paid amount, in the smallest units of the cryptocurrency.
[IfFlag(3)] public long crypto_amount;
+ [IfFlag(4)] public TextWithEntities message;
[Flags] public enum Flags : uint
{
@@ -2673,6 +2677,8 @@ namespace TL
unclaimed = 0x4,
/// Fields and have a value
has_crypto_currency = 0x8,
+ /// Field has a value
+ has_message = 0x10,
}
}
/// A giveaway was started. See
@@ -15659,7 +15665,7 @@ namespace TL
public long amount;
}
/// Used to gift Telegram Premium subscriptions only to some specific subscribers of a channel/supergroup or to some of our contacts, see here » for more info on giveaways and gifts. See
- [TLDef(0xA3805F3F)]
+ [TLDef(0xFB790393)]
public sealed partial class InputStorePaymentPremiumGiftCode : InputStorePaymentPurpose
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
@@ -15672,11 +15678,14 @@ namespace TL
public string currency;
/// Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).
public long amount;
+ [IfFlag(1)] public TextWithEntities message;
[Flags] public enum Flags : uint
{
/// Field has a value
has_boost_peer = 0x1,
+ /// Field has a value
+ has_message = 0x2,
}
}
/// Used to pay for a giveaway, see here » for more info. See
diff --git a/src/TL.Table.cs b/src/TL.Table.cs
index a6bd52c..f6ce107 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 = 189; // fetched 07/10/2024 12:32:56
+ public const int Version = 190; // fetched 15/10/2024 14:49:33
internal const int SecretChats = 144;
internal const int MTProto2 = 73;
internal const uint VectorCtor = 0x1CB5C415;
@@ -199,13 +199,13 @@ namespace TL
[0xEBBCA3CB] = typeof(MessageActionChatJoinedByRequest),
[0x47DD8079] = typeof(MessageActionWebViewDataSentMe),
[0xB4C38CB5] = typeof(MessageActionWebViewDataSent),
- [0xC83D6AEC] = typeof(MessageActionGiftPremium),
+ [0x6C6274FA] = typeof(MessageActionGiftPremium),
[0x0D999256] = typeof(MessageActionTopicCreate),
[0xC0944820] = typeof(MessageActionTopicEdit),
[0x57DE635E] = typeof(MessageActionSuggestProfilePhoto),
[0x31518E9B] = typeof(MessageActionRequestedPeer),
[0x5060A3F4] = typeof(MessageActionSetChatWallPaper),
- [0x678C2E09] = typeof(MessageActionGiftCode),
+ [0x56D03994] = typeof(MessageActionGiftCode),
[0xA80F51E4] = typeof(MessageActionGiveawayLaunch),
[0x87E2F155] = typeof(MessageActionGiveawayResults),
[0xCC02AA6D] = typeof(MessageActionBoostApply),
@@ -1098,7 +1098,7 @@ namespace TL
[0x5334759C] = typeof(Help_PremiumPromo),
[0xA6751E66] = typeof(InputStorePaymentPremiumSubscription),
[0x616F7FE8] = typeof(InputStorePaymentGiftPremium),
- [0xA3805F3F] = typeof(InputStorePaymentPremiumGiftCode),
+ [0xFB790393] = typeof(InputStorePaymentPremiumGiftCode),
[0x160544CA] = typeof(InputStorePaymentPremiumGiveaway),
[0xDDDD0F56] = typeof(InputStorePaymentStarsTopup),
[0x1D741EF7] = typeof(InputStorePaymentStarsGift),
diff --git a/src/WTelegramClient.csproj b/src/WTelegramClient.csproj
index 1a9619a..6af3003 100644
--- a/src/WTelegramClient.csproj
+++ b/src/WTelegramClient.csproj
@@ -13,7 +13,7 @@
WTelegramClient
0.0.0
Wizou
- Telegram Client API (MTProto) library written 100% in C# and .NET Standard | Latest API layer: 189
+ Telegram Client API (MTProto) library written 100% in C# and .NET Standard | Latest API layer: 190
Release Notes:
$(ReleaseNotes.Replace("|", "%0D%0A").Replace(" - ","%0D%0A- ").Replace(" ", "%0D%0A%0D%0A"))