diff --git a/.github/dev.yml b/.github/dev.yml index de5e874..15667dc 100644 --- a/.github/dev.yml +++ b/.github/dev.yml @@ -2,7 +2,7 @@ trigger: - master -name: 3.5.5-dev.$(Rev:r) +name: 3.5.6-dev.$(Rev:r) pool: vmImage: ubuntu-latest diff --git a/.github/release.yml b/.github/release.yml index 471e24e..9a1a012 100644 --- a/.github/release.yml +++ b/.github/release.yml @@ -25,15 +25,13 @@ stages: includePreviewVersions: true - task: DotNetCoreCLI@2 - env: - ReleaseNotes: $[replace($(releaseNotes), '"', '''''')] inputs: command: 'pack' packagesToPack: '**/*.csproj' includesymbols: true versioningScheme: 'byEnvVar' versionEnvVar: 'Build.BuildNumber' - buildProperties: 'NoWarn="0419;1573;1591";ContinuousIntegrationBuild=true;Version=$(Build.BuildNumber);ReleaseNotes="$ReleaseNotes"' + buildProperties: 'NoWarn="0419;1573;1591";ContinuousIntegrationBuild=true;Version=$(Build.BuildNumber);ReleaseNotes="$[replace($(releaseNotes), '"', '''''')]"' - task: NuGetCommand@2 inputs: diff --git a/README.md b/README.md index 5383898..8b3c7e2 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![API Layer](https://img.shields.io/badge/API_Layer-163-blueviolet)](https://corefork.telegram.org/methods) +[![API Layer](https://img.shields.io/badge/API_Layer-164-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://www.buymeacoffee.com/wizou) diff --git a/src/TL.Schema.cs b/src/TL.Schema.cs index fa98dac..2007e87 100644 --- a/src/TL.Schema.cs +++ b/src/TL.Schema.cs @@ -456,10 +456,10 @@ namespace TL public string emoticon; } /// See - [TLDef(0x9A86B58F)] + [TLDef(0x89FDD778)] public class InputMediaStory : InputMedia { - public InputUserBase user_id; + public InputPeer peer; public int id; } @@ -971,7 +971,7 @@ namespace TL public override string Title => title; } /// Channel/supergroup info See - [TLDef(0x83259464)] + [TLDef(0x94F592DB)] public partial class Channel : ChatBase { /// Extra bits of information, use flags.HasFlag(...) to test for those @@ -1002,6 +1002,7 @@ namespace TL [IfFlag(17)] public int participants_count; /// Additional usernames [IfFlag(32)] public Username[] usernames; + [IfFlag(36)] public int stories_max_id; [Flags] public enum Flags : uint { @@ -1063,6 +1064,11 @@ namespace TL { /// Field has a value has_usernames = 0x1, + stories_hidden = 0x2, + stories_hidden_min = 0x4, + stories_unavailable = 0x8, + /// Field has a value + has_stories_max_id = 0x10, } /// ID of the channel @@ -1238,7 +1244,7 @@ namespace TL public override ChatReactions AvailableReactions => available_reactions; } /// Full info about a channel, supergroup or gigagroup. See - [TLDef(0xF2355507)] + [TLDef(0x723027BD)] public partial class ChannelFull : ChatFullBase { /// Extra bits of information, use flags.HasFlag(...) to test for those @@ -1315,6 +1321,7 @@ namespace TL [IfFlag(29)] public Peer default_send_as; /// Allowed message reactions » [IfFlag(30)] public ChatReactions available_reactions; + [IfFlag(36)] public PeerStories stories; [Flags] public enum Flags : uint { @@ -1392,6 +1399,9 @@ namespace TL participants_hidden = 0x4, /// Whether the real-time chat translation popup should be hidden. translations_disabled = 0x8, + /// Field has a value + has_stories = 0x10, + stories_pinned_available = 0x20, } /// ID of the channel @@ -1920,11 +1930,11 @@ namespace TL public string emoticon; } /// See - [TLDef(0xCBB20D88)] + [TLDef(0x68CB6283)] public class MessageMediaStory : MessageMedia { public Flags flags; - public long user_id; + public Peer peer; public int id; [IfFlag(0)] public StoryItemBase story; @@ -2917,7 +2927,7 @@ namespace TL } /// Extended user info See - [TLDef(0x4FE1CC86)] + [TLDef(0xB9B12C6C)] public class UserFull : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those @@ -2958,7 +2968,7 @@ namespace TL [IfFlag(19)] public PremiumGiftOption[] premium_gifts; /// Wallpaper to use in the private chat with the user. [IfFlag(24)] public WallPaperBase wallpaper; - [IfFlag(25)] public UserStories stories; + [IfFlag(25)] public PeerStories stories; [Flags] public enum Flags : uint { @@ -4648,17 +4658,17 @@ namespace TL public long user_id; } /// See - [TLDef(0x205A4133)] + [TLDef(0x75B3B798)] public class UpdateStory : Update { - public long user_id; + public Peer peer; public StoryItemBase story; } /// See - [TLDef(0xFEB5345A)] + [TLDef(0xF74E932B)] public class UpdateReadStories : Update { - public long user_id; + public Peer peer; public int max_id; } /// See @@ -4675,10 +4685,10 @@ namespace TL public StoriesStealthMode stealth_mode; } /// See - [TLDef(0xE3A73D20)] + [TLDef(0x7D627683)] public class UpdateSentStoryReaction : Update { - public long user_id; + public Peer peer; public int story_id; public Reaction reaction; } @@ -9100,7 +9110,7 @@ namespace TL } /// Invoice See - [TLDef(0x3E85A91B)] + [TLDef(0x5DB95A15)] public class Invoice : IObject { /// Extra bits of information, use flags.HasFlag(...) to test for those @@ -9113,8 +9123,7 @@ namespace TL [IfFlag(8)] public long max_tip_amount; /// A vector of suggested amounts of tips in the smallest units of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount. [IfFlag(8)] public long[] suggested_tip_amounts; - /// Terms of service URL for the recurring payment - [IfFlag(9)] public string recurring_terms_url; + [IfFlag(10)] public string terms_url; [Flags] public enum Flags : uint { @@ -9138,6 +9147,8 @@ namespace TL has_max_tip_amount = 0x100, /// Whether this is a recurring payment recurring = 0x200, + /// Field has a value + has_terms_url = 0x400, } } @@ -11693,6 +11704,9 @@ namespace TL other = 0x1000, /// If set, allows the admin to create, delete or modify forum topics ». manage_topics = 0x2000, + post_stories = 0x4000, + edit_stories = 0x8000, + delete_stories = 0x10000, } } @@ -12318,11 +12332,11 @@ namespace TL } } /// See - [TLDef(0x939A4671)] + [TLDef(0x2E94C3E7)] public class WebPageAttributeStory : WebPageAttribute { public Flags flags; - public long user_id; + public Peer peer; public int id; [IfFlag(0)] public StoryItemBase story; @@ -15039,18 +15053,23 @@ namespace TL } /// See - [TLDef(0xC64C0B97)] + [TLDef(0x8D595CD6)] public class StoryViews : IObject { public Flags flags; public int views_count; - public int reactions_count; + [IfFlag(2)] public int forwards_count; + [IfFlag(3)] public ReactionCount[] reactions; + [IfFlag(4)] public int reactions_count; [IfFlag(0)] public long[] recent_viewers; [Flags] public enum Flags : uint { has_recent_viewers = 0x1, has_viewers = 0x2, + has_forwards_count = 0x4, + has_reactions = 0x8, + has_reactions_count = 0x10, } } @@ -15115,26 +15134,12 @@ namespace TL selected_contacts = 0x2000, has_media_areas = 0x4000, has_sent_reaction = 0x8000, + out_ = 0x10000, } public override int ID => id; } - /// See - [TLDef(0x8611A200)] - public class UserStories : IObject - { - public Flags flags; - public long user_id; - [IfFlag(0)] public int max_read_id; - public StoryItemBase[] stories; - - [Flags] public enum Flags : uint - { - has_max_read_id = 0x1, - } - } - /// See public abstract class Stories_AllStoriesBase : IObject { } /// See @@ -15150,13 +15155,14 @@ namespace TL } } /// See - [TLDef(0x519D899E)] - public class Stories_AllStories : Stories_AllStoriesBase + [TLDef(0x6EFC5E81)] + public class Stories_AllStories : Stories_AllStoriesBase, IPeerResolver { public Flags flags; public int count; public string state; - public UserStories[] user_stories; + public PeerStories[] peer_stories; + public Dictionary chats; public Dictionary users; public StoriesStealthMode stealth_mode; @@ -15164,23 +15170,20 @@ namespace TL { has_more = 0x1, } + /// returns a or for the given Peer + public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } /// See - [TLDef(0x4FE57DF1)] - public class Stories_Stories : IObject + [TLDef(0x5DD8C3C8)] + public class Stories_Stories : IObject, IPeerResolver { public int count; public StoryItemBase[] stories; + public Dictionary chats; public Dictionary users; - } - - /// See - [TLDef(0x37A6FF5F)] - public class Stories_UserStories : IObject - { - public UserStories stories; - public Dictionary users; + /// returns a or for the given Peer + public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); } /// See @@ -15282,14 +15285,12 @@ namespace TL } /// See - public abstract class MediaArea : IObject - { - public MediaAreaCoordinates coordinates; - } + public abstract class MediaArea : IObject { } /// See - [TLDef(0xBE82DB9C, inheritBefore = true)] + [TLDef(0xBE82DB9C)] public class MediaAreaVenue : MediaArea { + public MediaAreaCoordinates coordinates; public GeoPoint geo; public string title; public string address; @@ -15298,16 +15299,114 @@ namespace TL public string venue_type; } /// See - [TLDef(0xB282217F, inheritBefore = true)] + [TLDef(0xB282217F)] public class InputMediaAreaVenue : MediaArea { + public MediaAreaCoordinates coordinates; public long query_id; public string result_id; } /// See - [TLDef(0xDF8B3B22, inheritBefore = true)] + [TLDef(0xDF8B3B22)] public class MediaAreaGeoPoint : MediaArea { + public MediaAreaCoordinates coordinates; public GeoPoint geo; } + /// See + [TLDef(0x14455871)] + public class MediaAreaSuggestedReaction : MediaArea + { + public Flags flags; + public MediaAreaCoordinates coordinates; + public Reaction reaction; + + [Flags] public enum Flags : uint + { + dark = 0x1, + flipped = 0x2, + } + } + + /// See + [TLDef(0x9A35E999)] + public class PeerStories : IObject + { + public Flags flags; + public Peer peer; + [IfFlag(0)] public int max_read_id; + public StoryItemBase[] stories; + + [Flags] public enum Flags : uint + { + has_max_read_id = 0x1, + } + } + + /// See + [TLDef(0xCAE68768)] + public class Stories_PeerStories : IObject, IPeerResolver + { + public PeerStories stories; + public Dictionary chats; + public Dictionary users; + /// returns a or for the given Peer + public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats); + } + + /// See + [TLDef(0x66EA1FEF)] + public class Stories_BoostsStatus : IObject + { + public Flags flags; + public int level; + public int current_level_boosts; + public int boosts; + [IfFlag(0)] public int next_level_boosts; + [IfFlag(1)] public StatsPercentValue premium_audience; + + [Flags] public enum Flags : uint + { + has_next_level_boosts = 0x1, + has_premium_audience = 0x2, + my_boost = 0x4, + } + } + + /// See + public abstract class Stories_CanApplyBoostResult : IObject { } + /// See + [TLDef(0xC3173587)] + public class Stories_CanApplyBoostOk : Stories_CanApplyBoostResult { } + /// See + [TLDef(0x712C4655)] + public class Stories_CanApplyBoostReplace : Stories_CanApplyBoostResult + { + public Peer current_boost; + public Dictionary chats; + } + + /// See + [TLDef(0x0E9E6380)] + public class Booster : IObject + { + public long user_id; + public DateTime expires; + } + + /// See + [TLDef(0xF3DD3D1D)] + public class Stories_BoostersList : IObject + { + public Flags flags; + public int count; + public Booster[] boosters; + [IfFlag(0)] public string next_offset; + public Dictionary users; + + [Flags] public enum Flags : uint + { + has_next_offset = 0x1, + } + } } diff --git a/src/TL.SchemaFuncs.cs b/src/TL.SchemaFuncs.cs index 7556273..9a34753 100644 --- a/src/TL.SchemaFuncs.cs +++ b/src/TL.SchemaFuncs.cs @@ -1177,13 +1177,6 @@ namespace TL errors = errors, }); - /// See - public static Task Users_GetStoriesMaxIDs(this Client client, params InputUserBase[] id) - => client.Invoke(new Users_GetStoriesMaxIDs - { - id = id, - }); - /// Get contact by telegram IDs See /// Hash for pagination, for more info click here public static Task Contacts_GetContactIDs(this Client client, long hash = default) @@ -1407,14 +1400,6 @@ namespace TL id = id, }); - /// See - public static Task Contacts_ToggleStoriesHidden(this Client client, InputUserBase id, bool hidden) - => client.Invoke(new Contacts_ToggleStoriesHidden - { - id = id, - hidden = hidden, - }); - /// See public static Task Contacts_SetBlocked(this Client client, InputPeer[] id, int limit = int.MaxValue, bool my_stories_from = false) => client.Invoke(new Contacts_SetBlocked @@ -5649,16 +5634,18 @@ namespace TL }); /// See - public static Task Stories_CanSendStory(this Client client) + public static Task Stories_CanSendStory(this Client client, InputPeer peer) => client.Invoke(new Stories_CanSendStory { + peer = peer, }); /// See - public static Task Stories_SendStory(this Client client, InputMedia media, InputPrivacyRule[] privacy_rules, long random_id, string caption = null, MessageEntity[] entities = null, int? period = null, MediaArea[] media_areas = null, bool pinned = false, bool noforwards = false) + public static Task Stories_SendStory(this Client client, InputPeer peer, InputMedia media, InputPrivacyRule[] privacy_rules, long random_id, string caption = null, MessageEntity[] entities = null, int? period = null, MediaArea[] media_areas = null, bool pinned = false, bool noforwards = false) => client.Invoke(new Stories_SendStory { flags = (Stories_SendStory.Flags)((caption != null ? 0x1 : 0) | (entities != null ? 0x2 : 0) | (period != null ? 0x8 : 0) | (media_areas != null ? 0x20 : 0) | (pinned ? 0x4 : 0) | (noforwards ? 0x10 : 0)), + peer = peer, media = media, media_areas = media_areas, caption = caption, @@ -5669,10 +5656,11 @@ namespace TL }); /// See - public static Task Stories_EditStory(this Client client, int id, InputMedia media = null, string caption = null, MessageEntity[] entities = null, InputPrivacyRule[] privacy_rules = null, MediaArea[] media_areas = null) + public static Task Stories_EditStory(this Client client, InputPeer peer, int id, InputMedia media = null, string caption = null, MessageEntity[] entities = null, InputPrivacyRule[] privacy_rules = null, MediaArea[] media_areas = null) => client.Invoke(new Stories_EditStory { flags = (Stories_EditStory.Flags)((media != null ? 0x1 : 0) | (caption != null ? 0x2 : 0) | (entities != null ? 0x2 : 0) | (privacy_rules != null ? 0x4 : 0) | (media_areas != null ? 0x8 : 0)), + peer = peer, id = id, media = media, media_areas = media_areas, @@ -5682,16 +5670,18 @@ namespace TL }); /// See - public static Task Stories_DeleteStories(this Client client, params int[] id) + public static Task Stories_DeleteStories(this Client client, InputPeer peer, params int[] id) => client.Invoke(new Stories_DeleteStories { + peer = peer, id = id, }); /// See - public static Task Stories_TogglePinned(this Client client, int[] id, bool pinned) + public static Task Stories_TogglePinned(this Client client, InputPeer peer, int[] id, bool pinned) => client.Invoke(new Stories_TogglePinned { + peer = peer, id = id, pinned = pinned, }); @@ -5704,35 +5694,29 @@ namespace TL state = state, }); - /// See - public static Task Stories_GetUserStories(this Client client, InputUserBase user_id) - => client.Invoke(new Stories_GetUserStories - { - user_id = user_id, - }); - /// See - public static Task Stories_GetPinnedStories(this Client client, InputUserBase user_id, int offset_id = default, int limit = int.MaxValue) + public static Task Stories_GetPinnedStories(this Client client, InputPeer peer, int offset_id = default, int limit = int.MaxValue) => client.Invoke(new Stories_GetPinnedStories { - user_id = user_id, + peer = peer, offset_id = offset_id, limit = limit, }); /// See - public static Task Stories_GetStoriesArchive(this Client client, int offset_id = default, int limit = int.MaxValue) + public static Task Stories_GetStoriesArchive(this Client client, InputPeer peer, int offset_id = default, int limit = int.MaxValue) => client.Invoke(new Stories_GetStoriesArchive { + peer = peer, offset_id = offset_id, limit = limit, }); /// See - public static Task Stories_GetStoriesByID(this Client client, InputUserBase user_id, params int[] id) + public static Task Stories_GetStoriesByID(this Client client, InputPeer peer, params int[] id) => client.Invoke(new Stories_GetStoriesByID { - user_id = user_id, + peer = peer, id = id, }); @@ -5743,33 +5727,28 @@ namespace TL hidden = hidden, }); - /// See - public static Task Stories_GetAllReadUserStories(this Client client) - => client.Invoke(new Stories_GetAllReadUserStories - { - }); - /// See - public static Task Stories_ReadStories(this Client client, InputUserBase user_id, int max_id = default) + public static Task Stories_ReadStories(this Client client, InputPeer peer, int max_id = default) => client.Invoke(new Stories_ReadStories { - user_id = user_id, + peer = peer, max_id = max_id, }); /// See - public static Task Stories_IncrementStoryViews(this Client client, InputUserBase user_id, params int[] id) + public static Task Stories_IncrementStoryViews(this Client client, InputPeer peer, params int[] id) => client.Invoke(new Stories_IncrementStoryViews { - user_id = user_id, + peer = peer, id = id, }); /// See - public static Task Stories_GetStoryViewsList(this Client client, int id, string offset, int limit = int.MaxValue, string q = null, bool just_contacts = false, bool reactions_first = false) + public static Task Stories_GetStoryViewsList(this Client client, InputPeer peer, int id, string offset, int limit = int.MaxValue, string q = null, bool just_contacts = false, bool reactions_first = false) => client.Invoke(new Stories_GetStoryViewsList { flags = (Stories_GetStoryViewsList.Flags)((q != null ? 0x2 : 0) | (just_contacts ? 0x1 : 0) | (reactions_first ? 0x4 : 0)), + peer = peer, q = q, id = id, offset = offset, @@ -5777,25 +5756,26 @@ namespace TL }); /// See - public static Task Stories_GetStoriesViews(this Client client, params int[] id) + public static Task Stories_GetStoriesViews(this Client client, InputPeer peer, params int[] id) => client.Invoke(new Stories_GetStoriesViews { + peer = peer, id = id, }); /// See - public static Task Stories_ExportStoryLink(this Client client, InputUserBase user_id, int id) + public static Task Stories_ExportStoryLink(this Client client, InputPeer peer, int id) => client.Invoke(new Stories_ExportStoryLink { - user_id = user_id, + peer = peer, id = id, }); /// See - public static Task Stories_Report(this Client client, InputUserBase user_id, int[] id, ReportReason reason, string message) + public static Task Stories_Report(this Client client, InputPeer peer, int[] id, ReportReason reason, string message) => client.Invoke(new Stories_Report { - user_id = user_id, + peer = peer, id = id, reason = reason, message = message, @@ -5809,14 +5789,78 @@ namespace TL }); /// See - public static Task Stories_SendReaction(this Client client, InputUserBase user_id, int story_id, Reaction reaction, bool add_to_recent = false) + public static Task Stories_SendReaction(this Client client, InputPeer peer, int story_id, Reaction reaction, bool add_to_recent = false) => client.Invoke(new Stories_SendReaction { flags = (Stories_SendReaction.Flags)(add_to_recent ? 0x1 : 0), - user_id = user_id, + peer = peer, story_id = story_id, reaction = reaction, }); + + /// See + public static Task Stories_GetPeerStories(this Client client, InputPeer peer) + => client.Invoke(new Stories_GetPeerStories + { + peer = peer, + }); + + /// See + public static Task Stories_GetAllReadPeerStories(this Client client) + => client.Invoke(new Stories_GetAllReadPeerStories + { + }); + + /// See + public static Task Stories_GetPeerMaxIDs(this Client client, params InputPeer[] id) + => client.Invoke(new Stories_GetPeerMaxIDs + { + id = id, + }); + + /// See + public static Task Stories_GetChatsToSend(this Client client) + => client.Invoke(new Stories_GetChatsToSend + { + }); + + /// See + public static Task Stories_TogglePeerStoriesHidden(this Client client, InputPeer peer, bool hidden) + => client.Invoke(new Stories_TogglePeerStoriesHidden + { + peer = peer, + hidden = hidden, + }); + + /// See + public static Task Stories_GetBoostsStatus(this Client client, InputPeer peer) + => client.Invoke(new Stories_GetBoostsStatus + { + peer = peer, + }); + + /// See + public static Task Stories_GetBoostersList(this Client client, InputPeer peer, string offset, int limit = int.MaxValue) + => client.Invoke(new Stories_GetBoostersList + { + peer = peer, + offset = offset, + limit = limit, + }); + + /// See + public static Task Stories_CanApplyBoost(this Client client, InputPeer peer) + => client.Invoke(new Stories_CanApplyBoost + { + peer = peer, + }); + + /// See + public static Task Stories_ApplyBoost(this Client client, InputPeer peer) + => client.Invoke(new Stories_ApplyBoost + { + peer = peer, + }); } } @@ -6719,12 +6763,6 @@ namespace TL.Methods public SecureValueErrorBase[] errors; } - [TLDef(0xCA1CB9AB)] - public class Users_GetStoriesMaxIDs : IMethod - { - public InputUserBase[] id; - } - [TLDef(0x7ADC669D)] public class Contacts_GetContactIDs : IMethod { @@ -6918,13 +6956,6 @@ namespace TL.Methods public long[] id; } - [TLDef(0x753FB865)] - public class Contacts_ToggleStoriesHidden : IMethod - { - public InputUserBase id; - public bool hidden; - } - [TLDef(0x94C65C76)] public class Contacts_SetBlocked : IMethod { @@ -10417,13 +10448,17 @@ namespace TL.Methods public InputPeer[] peers; } - [TLDef(0xB100D45D)] - public class Stories_CanSendStory : IMethod { } + [TLDef(0xC7DFDFDD)] + public class Stories_CanSendStory : IMethod + { + public InputPeer peer; + } - [TLDef(0xD455FCEC)] + [TLDef(0xBCB73644)] public class Stories_SendStory : IMethod { public Flags flags; + public InputPeer peer; public InputMedia media; [IfFlag(5)] public MediaArea[] media_areas; [IfFlag(0)] public string caption; @@ -10443,10 +10478,11 @@ namespace TL.Methods } } - [TLDef(0xA9B91AE4)] + [TLDef(0xB583BA46)] public class Stories_EditStory : IMethod { public Flags flags; + public InputPeer peer; public int id; [IfFlag(0)] public InputMedia media; [IfFlag(3)] public MediaArea[] media_areas; @@ -10463,15 +10499,17 @@ namespace TL.Methods } } - [TLDef(0xB5D501D7)] + [TLDef(0xAE59DB5F)] public class Stories_DeleteStories : IMethod { + public InputPeer peer; public int[] id; } - [TLDef(0x51602944)] + [TLDef(0x9A75A1EF)] public class Stories_TogglePinned : IMethod { + public InputPeer peer; public int[] id; public bool pinned; } @@ -10490,31 +10528,26 @@ namespace TL.Methods } } - [TLDef(0x96D528E0)] - public class Stories_GetUserStories : IMethod - { - public InputUserBase user_id; - } - - [TLDef(0x0B471137)] + [TLDef(0x5821A5DC)] public class Stories_GetPinnedStories : IMethod { - public InputUserBase user_id; + public InputPeer peer; public int offset_id; public int limit; } - [TLDef(0x1F5BC5D2)] + [TLDef(0xB4352016)] public class Stories_GetStoriesArchive : IMethod { + public InputPeer peer; public int offset_id; public int limit; } - [TLDef(0x6A15CF46)] + [TLDef(0x5774CA74)] public class Stories_GetStoriesByID : IMethod { - public InputUserBase user_id; + public InputPeer peer; public int[] id; } @@ -10524,27 +10557,25 @@ namespace TL.Methods public bool hidden; } - [TLDef(0x729C562C)] - public class Stories_GetAllReadUserStories : IMethod { } - - [TLDef(0xEDC5105B)] + [TLDef(0xA556DAC8)] public class Stories_ReadStories : IMethod { - public InputUserBase user_id; + public InputPeer peer; public int max_id; } - [TLDef(0x22126127)] + [TLDef(0xB2028AFB)] public class Stories_IncrementStoryViews : IMethod { - public InputUserBase user_id; + public InputPeer peer; public int[] id; } - [TLDef(0xF95F61A4)] + [TLDef(0x7ED23C57)] public class Stories_GetStoryViewsList : IMethod { public Flags flags; + public InputPeer peer; [IfFlag(1)] public string q; public int id; public string offset; @@ -10558,23 +10589,24 @@ namespace TL.Methods } } - [TLDef(0x9A75D6A6)] + [TLDef(0x28E16CC8)] public class Stories_GetStoriesViews : IMethod { + public InputPeer peer; public int[] id; } - [TLDef(0x16E443CE)] + [TLDef(0x7B8DEF20)] public class Stories_ExportStoryLink : IMethod { - public InputUserBase user_id; + public InputPeer peer; public int id; } - [TLDef(0xC95BE06A)] + [TLDef(0x1923FA8C)] public class Stories_Report : IMethod { - public InputUserBase user_id; + public InputPeer peer; public int[] id; public ReportReason reason; public string message; @@ -10592,11 +10624,11 @@ namespace TL.Methods } } - [TLDef(0x49AAA9B3)] + [TLDef(0x7FD736B2)] public class Stories_SendReaction : IMethod { public Flags flags; - public InputUserBase user_id; + public InputPeer peer; public int story_id; public Reaction reaction; @@ -10605,4 +10637,55 @@ namespace TL.Methods add_to_recent = 0x1, } } + + [TLDef(0x2C4ADA50)] + public class Stories_GetPeerStories : IMethod + { + public InputPeer peer; + } + + [TLDef(0x9B5AE7F9)] + public class Stories_GetAllReadPeerStories : IMethod { } + + [TLDef(0x535983C3)] + public class Stories_GetPeerMaxIDs : IMethod + { + public InputPeer[] id; + } + + [TLDef(0xA56A8B60)] + public class Stories_GetChatsToSend : IMethod { } + + [TLDef(0xBD0415C4)] + public class Stories_TogglePeerStoriesHidden : IMethod + { + public InputPeer peer; + public bool hidden; + } + + [TLDef(0x4C449472)] + public class Stories_GetBoostsStatus : IMethod + { + public InputPeer peer; + } + + [TLDef(0x337EF980)] + public class Stories_GetBoostersList : IMethod + { + public InputPeer peer; + public string offset; + public int limit; + } + + [TLDef(0xDB05C1BD)] + public class Stories_CanApplyBoost : IMethod + { + public InputPeer peer; + } + + [TLDef(0xF29D7C2B)] + public class Stories_ApplyBoost : IMethod + { + public InputPeer peer; + } } diff --git a/src/TL.Table.cs b/src/TL.Table.cs index da062dc..3acd017 100644 --- a/src/TL.Table.cs +++ b/src/TL.Table.cs @@ -6,7 +6,7 @@ namespace TL { public static class Layer { - public const int Version = 163; // fetched 18/09/2023 17:16:36 + public const int Version = 164; // fetched 22/09/2023 19:03:28 internal const int SecretChats = 144; internal const int MTProto2 = 73; internal const uint VectorCtor = 0x1CB5C415; @@ -98,7 +98,7 @@ namespace TL [0x971FA843] = typeof(InputMediaGeoLive), [0x0F94E5F1] = typeof(InputMediaPoll), [0xE66FBF7B] = typeof(InputMediaDice), - [0x9A86B58F] = typeof(InputMediaStory), + [0x89FDD778] = typeof(InputMediaStory), [0x1CA48F57] = null,//InputChatPhotoEmpty [0xBDCDAEC0] = typeof(InputChatUploadedPhoto), [0x8953AD37] = typeof(InputChatPhoto), @@ -132,10 +132,10 @@ namespace TL [0x29562865] = typeof(ChatEmpty), [0x41CBF256] = typeof(Chat), [0x6592A1A7] = typeof(ChatForbidden), - [0x83259464] = typeof(Channel), + [0x94F592DB] = typeof(Channel), [0x17D493D5] = typeof(ChannelForbidden), [0xC9D31138] = typeof(ChatFull), - [0xF2355507] = typeof(ChannelFull), + [0x723027BD] = typeof(ChannelFull), [0xC02D4007] = typeof(ChatParticipant), [0xE46BCEE4] = typeof(ChatParticipantCreator), [0xA0933F5B] = typeof(ChatParticipantAdmin), @@ -159,7 +159,7 @@ namespace TL [0xB940C666] = typeof(MessageMediaGeoLive), [0x4BD6E798] = typeof(MessageMediaPoll), [0x3F7EE58B] = typeof(MessageMediaDice), - [0xCBB20D88] = typeof(MessageMediaStory), + [0x68CB6283] = typeof(MessageMediaStory), [0xB6AEF7B0] = null,//MessageActionEmpty [0xBD47CBAD] = typeof(MessageActionChatCreate), [0xB5A1CE5A] = typeof(MessageActionChatEditTitle), @@ -226,7 +226,7 @@ namespace TL [0xA518110D] = typeof(PeerSettings), [0xA437C3ED] = typeof(WallPaper), [0xE0804116] = typeof(WallPaperNoFile), - [0x4FE1CC86] = typeof(UserFull), + [0xB9B12C6C] = typeof(UserFull), [0x145ADE0B] = typeof(Contact), [0xC13E3C50] = typeof(ImportedContact), [0x16D9703B] = typeof(ContactStatus), @@ -375,11 +375,11 @@ namespace TL [0x20529438] = typeof(UpdateUser), [0xEC05B097] = typeof(UpdateAutoSaveSettings), [0xCCF08AD6] = typeof(UpdateGroupInvitePrivacyForbidden), - [0x205A4133] = typeof(UpdateStory), - [0xFEB5345A] = typeof(UpdateReadStories), + [0x75B3B798] = typeof(UpdateStory), + [0xF74E932B] = typeof(UpdateReadStories), [0x1BF335B9] = typeof(UpdateStoryID), [0x2C084DC1] = typeof(UpdateStoriesStealthMode), - [0xE3A73D20] = typeof(UpdateSentStoryReaction), + [0x7D627683] = typeof(UpdateSentStoryReaction), [0xA56C2A3E] = typeof(Updates_State), [0x5D75A138] = typeof(Updates_DifferenceEmpty), [0x00F49CA0] = typeof(Updates_Difference), @@ -697,7 +697,7 @@ namespace TL [0xA44F3EF6] = typeof(PageBlockMap), [0x7D748D04] = typeof(DataJSON), [0xCB296BF8] = typeof(LabeledPrice), - [0x3E85A91B] = typeof(Invoice), + [0x5DB95A15] = typeof(Invoice), [0xEA02C27E] = typeof(PaymentCharge), [0x1E8CAAEB] = typeof(PostAddress), [0x909C3F94] = typeof(PaymentRequestedInfo), @@ -919,7 +919,7 @@ namespace TL [0x8FDE504F] = typeof(InputThemeSettings), [0xFA58B6D4] = typeof(ThemeSettings), [0x54B56617] = typeof(WebPageAttributeTheme), - [0x939A4671] = typeof(WebPageAttributeStory), + [0x2E94C3E7] = typeof(WebPageAttributeStory), [0x4899484E] = typeof(Messages_VotesList), [0xF568028A] = typeof(BankCardOpenUrl), [0x3E24E573] = typeof(Payments_BankCardData), @@ -1106,15 +1106,13 @@ namespace TL [0x74CDA504] = typeof(MessagePeerVoteInputOption), [0x4628F6E6] = typeof(MessagePeerVoteMultiple), [0x3DB8EC63] = typeof(SponsoredWebPage), - [0xC64C0B97] = typeof(StoryViews), + [0x8D595CD6] = typeof(StoryViews), [0x51E6EE4F] = typeof(StoryItemDeleted), [0xFFADC913] = typeof(StoryItemSkipped), [0x44C457CE] = typeof(StoryItem), - [0x8611A200] = typeof(UserStories), [0x1158FE3E] = typeof(Stories_AllStoriesNotModified), - [0x519D899E] = typeof(Stories_AllStories), - [0x4FE57DF1] = typeof(Stories_Stories), - [0x37A6FF5F] = typeof(Stories_UserStories), + [0x6EFC5E81] = typeof(Stories_AllStories), + [0x5DD8C3C8] = typeof(Stories_Stories), [0xB0BDEAC5] = typeof(StoryView), [0x46E9B9EC] = typeof(Stories_StoryViewsList), [0xDE9EED1D] = typeof(Stories_StoryViews), @@ -1126,6 +1124,14 @@ namespace TL [0xBE82DB9C] = typeof(MediaAreaVenue), [0xB282217F] = typeof(InputMediaAreaVenue), [0xDF8B3B22] = typeof(MediaAreaGeoPoint), + [0x14455871] = typeof(MediaAreaSuggestedReaction), + [0x9A35E999] = typeof(PeerStories), + [0xCAE68768] = typeof(Stories_PeerStories), + [0x66EA1FEF] = typeof(Stories_BoostsStatus), + [0xC3173587] = typeof(Stories_CanApplyBoostOk), + [0x712C4655] = typeof(Stories_CanApplyBoostReplace), + [0x0E9E6380] = typeof(Booster), + [0xF3DD3D1D] = typeof(Stories_BoostersList), // from TL.Secret: [0x6ABD9782] = typeof(Layer143.DecryptedMessageMediaDocument), [0x91CC4674] = typeof(Layer73.DecryptedMessage), diff --git a/src/WTelegramClient.csproj b/src/WTelegramClient.csproj index 7fb65db..21b9a32 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: 163 Release Notes: $(ReleaseNotes.Replace("|", "%0D%0A").Replace(" - ","%0D%0A- ").Replace(" ", "%0D%0A%0D%0A")) + Telegram Client API (MTProto) library written 100% in C# and .NET Standard | Latest API layer: 164 Release Notes: $(ReleaseNotes.Replace("|", "%0D%0A").Replace(" - ","%0D%0A- ").Replace(" ", "%0D%0A%0D%0A")) Copyright © Olivier Marcoux 2021-2023 MIT https://github.com/wiz0u/WTelegramClient