From 6f3c8732ec2fc1ca1c8a0c948b848446748ff36f Mon Sep 17 00:00:00 2001 From: Wizou <11647984+wiz0u@users.noreply.github.com> Date: Thu, 18 Jan 2024 15:53:17 +0100 Subject: [PATCH] API Layer 172: Premium last-seen, read-dates, contacts --- .github/dev.yml | 2 +- LICENSE.txt | 2 +- README.md | 2 +- src/TL.Schema.cs | 169 ++++++++++++++++++++++++++++++------- src/TL.SchemaFuncs.cs | 59 ++++++++++--- src/TL.Table.cs | 9 +- src/WTelegramClient.csproj | 4 +- 7 files changed, 198 insertions(+), 49 deletions(-) diff --git a/.github/dev.yml b/.github/dev.yml index 1d237e5..924fdae 100644 --- a/.github/dev.yml +++ b/.github/dev.yml @@ -1,7 +1,7 @@ pr: none trigger: [ master ] -name: 3.6.4-dev.$(Rev:r) +name: 3.6.5-dev.$(Rev:r) pool: vmImage: ubuntu-latest diff --git a/LICENSE.txt b/LICENSE.txt index 08900bc..3265a97 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2021 Olivier Marcoux +Copyright (c) 2021-2024 Olivier Marcoux Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 148c38b..16ed2af 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![API Layer](https://img.shields.io/badge/API_Layer-170-blueviolet)](https://corefork.telegram.org/methods) +[![API Layer](https://img.shields.io/badge/API_Layer-172-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 5e52a37..e6c7549 100644 --- a/src/TL.Schema.cs +++ b/src/TL.Schema.cs @@ -864,6 +864,7 @@ namespace TL has_color = 0x100, /// Field has a value has_profile_color = 0x200, + contact_require_premium = 0x400, } } @@ -910,14 +911,38 @@ namespace TL public int was_online; } /// Online status: last seen recently See - [TLDef(0xE26F42F1)] - public partial class UserStatusRecently : UserStatus { } + [TLDef(0x7B197DC8)] + public partial class UserStatusRecently : UserStatus + { + public Flags flags; + + [Flags] public enum Flags : uint + { + by_me = 0x1, + } + } /// Online status: last seen last week See - [TLDef(0x07BF09FC)] - public partial class UserStatusLastWeek : UserStatus { } + [TLDef(0x541A1D1A)] + public partial class UserStatusLastWeek : UserStatus + { + public Flags flags; + + [Flags] public enum Flags : uint + { + by_me = 0x1, + } + } /// Online status: last seen last month See - [TLDef(0x77EBC742)] - public partial class UserStatusLastMonth : UserStatus { } + [TLDef(0x65899777)] + public partial class UserStatusLastMonth : UserStatus + { + public Flags flags; + + [Flags] public enum Flags : uint + { + by_me = 0x1, + } + } /// Object defines a group. See Derived classes: , , , , public abstract partial class ChatBase : IObject @@ -1039,8 +1064,11 @@ namespace TL [IfFlag(36)] public int stories_max_id; /// The channel's accent color. [IfFlag(39)] public PeerColor color; + /// The channel's profile color. [IfFlag(40)] public PeerColor profile_color; + /// Emoji status [IfFlag(41)] public EmojiStatus emoji_status; + /// Boost level [IfFlag(42)] public int level; [Flags] public enum Flags : uint @@ -1373,6 +1401,7 @@ namespace TL [IfFlag(30)] public ChatReactions available_reactions; /// Channel stories [IfFlag(36)] public PeerStories stories; + /// Wallpaper [IfFlag(39)] public WallPaperBase wallpaper; [Flags] public enum Flags : uint @@ -2040,6 +2069,7 @@ namespace TL public long[] channels; /// If set, only users residing in these countries can participate in the giveaway, (specified as a list of two-letter ISO 3166-1 alpha-2 country codes); otherwise there are no country-based limitations. [IfFlag(1)] public string[] countries_iso2; + /// Can contain a textual description of additional giveaway prizes. [IfFlag(3)] public string prize_description; /// Number of Telegram Premium subscriptions given away. public int quantity; @@ -2054,32 +2084,44 @@ namespace TL only_new_subscribers = 0x1, /// Field has a value has_countries_iso2 = 0x2, + /// If set, giveaway winners are public and will be listed in a message that will be automatically sent to the channel once the giveaway ends. winners_are_visible = 0x4, /// Field has a value has_prize_description = 0x8, } } - /// See + /// A giveaway with public winners has finished, this constructor contains info about the winners. See [TLDef(0xC6991068)] public class MessageMediaGiveawayResults : MessageMedia { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; + /// ID of the channel that was automatically boosted by the winners of the giveaway for duration of the Premium subscription. public long channel_id; + /// Number of other channels that participated in the giveaway. [IfFlag(3)] public int additional_peers_count; + /// Identifier of the message with the giveaway in channel_id. public int launch_msg_id; + /// Total number of winners in the giveaway. public int winners_count; + /// Number of not-yet-claimed prizes. public int unclaimed_count; + /// Up to 100 user identifiers of the winners of the giveaway. public long[] winners; + /// Duration in months of each Telegram Premium subscription in the giveaway. public int months; + /// Can contain a textual description of additional giveaway prizes. [IfFlag(1)] public string prize_description; + /// Point in time (Unix timestamp) when the winners were selected. May be bigger than winners selection date specified in initial parameters of the giveaway. public DateTime until_date; [Flags] public enum Flags : uint { + /// If set, only new subscribers starting from the giveaway creation date participated in the giveaway. only_new_subscribers = 0x1, /// Field has a value has_prize_description = 0x2, + /// If set, the giveaway was canceled and was fully refunded. refunded = 0x4, /// Field has a value has_additional_peers_count = 0x8, @@ -2466,12 +2508,13 @@ namespace TL /// The photo that the user suggested we set as profile picture. public PhotoBase photo; } - /// Contains info about a peer that the user shared with the bot after clicking on a button. See + /// Contains info about one or more peers that the user shared with the bot after clicking on a button. See [TLDef(0x31518E9B)] public class MessageActionRequestedPeer : MessageAction { /// button_id contained in the public int button_id; + /// The shared peers public Peer[] peers; } /// The wallpaper » of the current chat was changed. See @@ -2503,9 +2546,13 @@ namespace TL public int months; /// Slug of the Telegram Premium giftcode link public string slug; + /// Three-letter ISO 4217 currency code [IfFlag(2)] 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). [IfFlag(2)] public long amount; + /// If set, the gift was made using the specified cryptocurrency. [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; [Flags] public enum Flags : uint @@ -3222,8 +3269,10 @@ namespace TL stories_pinned_available = 0x4000000, /// Whether we've blocked this user, preventing them from seeing our stories ». blocked_my_stories_from = 0x8000000, - /// Whether the other user has chosen a custom wallpaper for us using Messages_SetChatWallPaper and the for_both flag, see here » for more info. + /// Whether the other user has chosen a custom wallpaper for us using Messages_SetChatWallPaper and the for_both flag, see here » for more info. wallpaper_overridden = 0x10000000, + contact_require_premium = 0x20000000, + read_dates_private = 0x40000000, } } @@ -5003,32 +5052,44 @@ namespace TL { /// Field has a value has_wallpaper = 0x1, - /// Whether the other user has chosen a custom wallpaper for us using Messages_SetChatWallPaper and the for_both flag, see here » for more info. + /// Whether the other user has chosen a custom wallpaper for us using Messages_SetChatWallPaper and the for_both flag, see here » for more info. wallpaper_overridden = 0x2, } } - /// See + /// Bots only: a user has changed their reactions on a message with public reactions. See [TLDef(0xAC21D3CE)] public class UpdateBotMessageReaction : Update { + /// Peer of the reacted-to message. public Peer peer; + /// ID of the reacted-to message. public int msg_id; + /// Date of the change. public DateTime date; + /// The user that (un)reacted to the message. public Peer actor; + /// Old reactions public Reaction[] old_reactions; + /// New reactions public Reaction[] new_reactions; + /// QTS event sequence identifier public int qts; public override (long, int, int) GetMBox() => (-1, qts, 1); } - /// See + /// Bots only: the number of reactions on a message with anonymous reactions has changed. See [TLDef(0x09CB7759)] public class UpdateBotMessageReactions : Update { + /// Peer of the reacted-to message. public Peer peer; + /// ID of the reacted-to message. public int msg_id; + /// Date of the change. public DateTime date; + /// New reaction counters. public ReactionCount[] reactions; + /// QTS event sequence identifier public int qts; public override (long, int, int) GetMBox() => (-1, qts, 1); @@ -6980,7 +7041,7 @@ namespace TL /// Default custom emoji stickerset for forum topic icons See [TLDef(0x44C1F8E9)] public class InputStickerSetEmojiDefaultTopicIcons : InputStickerSet { } - /// See + /// Default custom emoji status stickerset for channel statuses See [TLDef(0x49748553)] public class InputStickerSetEmojiChannelDefaultStatuses : InputStickerSet { } @@ -7035,6 +7096,7 @@ namespace TL has_thumb_document_id = 0x100, /// Whether the color of this TGS custom emoji stickerset should be changed to the text color when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context. text_color = 0x200, + /// If set, this custom emoji stickerset can be used in channel emoji statuses. channel_emoji_status = 0x400, } } @@ -7283,14 +7345,15 @@ namespace TL public class KeyboardButtonSimpleWebView : KeyboardButtonWebView { } - /// Prompts the user to select and share a peer with the bot using Messages_SendBotRequestedPeer See + /// Prompts the user to select and share one or more peers with the bot using Messages_SendBotRequestedPeer See [TLDef(0x53D7BFD8, inheritBefore = true)] public class KeyboardButtonRequestPeer : KeyboardButton { /// Button ID, to be passed to Messages_SendBotRequestedPeer. public int button_id; - /// Filtering criteria to use for the peer selection list shown to the user.
The list should display all existing peers of the specified type, and should also offer an option for the user to create and immediately use a peer of the specified type, if needed.
+ /// Filtering criteria to use for the peer selection list shown to the user.
The list should display all existing peers of the specified type, and should also offer an option for the user to create and immediately use one or more (up to max_quantity) peers of the specified type, if needed.
public RequestPeerType peer_type; + /// Maximum number of peers that can be chosne. public int max_quantity; } @@ -10963,28 +11026,34 @@ namespace TL /// Whether antispam functionality was enabled or disabled. public bool new_value; } - ///
See + /// The message accent color was changed See [TLDef(0x5796E780)] public class ChannelAdminLogEventActionChangePeerColor : ChannelAdminLogEventAction { + /// Previous accent palette public PeerColor prev_value; + /// New accent palette public PeerColor new_value; } - /// See + /// The profile accent color was changed See [TLDef(0x5E477B25)] public class ChannelAdminLogEventActionChangeProfilePeerColor : ChannelAdminLogEventActionChangePeerColor { } - /// See + /// The wallpaper was changed See [TLDef(0x31BB5D52)] public class ChannelAdminLogEventActionChangeWallpaper : ChannelAdminLogEventAction { + /// Previous wallpaper public WallPaperBase prev_value; + /// New wallpaper public WallPaperBase new_value; } - /// See + /// The emoji status was changed See [TLDef(0x3EA9FEB1)] public class ChannelAdminLogEventActionChangeEmojiStatus : ChannelAdminLogEventAction { + /// Previous emoji status public EmojiStatus prev_value; + /// New emoji status public EmojiStatus new_value; } @@ -12383,6 +12452,7 @@ namespace TL [IfFlag(3)] public int intensity; /// Clockwise rotation angle of the gradient, in degrees; 0-359. Should be always divisible by 45. [IfFlag(4)] public int rotation; + /// If set, this wallpaper can be used as a channel wallpaper and is represented by the specified UTF-8 emoji. [IfFlag(7)] public string emoticon; [Flags] public enum Flags : uint @@ -13341,6 +13411,8 @@ namespace TL keep_archived_unmuted = 0x2, /// Whether unmuted chats that are always included or pinned in a folder, will be kept in the Archive chat list when they get a new message. Ignored if keep_archived_unmuted is set. keep_archived_folders = 0x4, + hide_read_marks = 0x8, + new_noncontact_peers_require_premium = 0x10, } } @@ -14800,6 +14872,7 @@ namespace TL [IfFlag(1)] public InputPeer[] additional_peers; /// The set of users that can participate to the giveaway can be restricted by passing here an explicit whitelist of up to giveaway_countries_max countries, specified as two-letter ISO 3166-1 alpha-2 country codes. [IfFlag(2)] public string[] countries_iso2; + /// Can contain a textual description of additional giveaway prizes. [IfFlag(4)] public string prize_description; /// Random ID to avoid resending the giveaway public long random_id; @@ -14818,6 +14891,7 @@ namespace TL has_additional_peers = 0x2, /// Field has a value has_countries_iso2 = 0x4, + /// If set, giveaway winners are public and will be listed in a message that will be automatically sent to the channel once the giveaway ends. winners_are_visible = 0x8, /// Field has a value has_prize_description = 0x10, @@ -15959,32 +16033,39 @@ namespace TL has_reaction = 0x4, } } - /// See + /// A certain peer has forwarded the story as a message to a public chat or channel. See [TLDef(0x9083670B)] public class StoryViewPublicForward : StoryViewBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; + /// The message with the forwarded story. public MessageBase message; [Flags] public enum Flags : uint { + /// Whether we have completely blocked this user, including from viewing more of our stories. blocked = 0x1, + /// Whether we have blocked this user from viewing more of our stories. blocked_my_stories_from = 0x2, } } - /// See + /// A certain peer has reposted the story. See [TLDef(0xBD74CF49)] public class StoryViewPublicRepost : StoryViewBase { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; + /// The peer that reposted the story. public Peer peer_id; + /// The reposted story. public StoryItemBase story; [Flags] public enum Flags : uint { + /// Whether we have completely blocked this user, including from viewing more of our stories. blocked = 0x1, + /// Whether we have blocked this user from viewing more of our stories. blocked_my_stories_from = 0x2, } } @@ -15997,12 +16078,15 @@ namespace TL public Flags flags; /// Total number of results that can be fetched public int count; + /// Total number of story views public int views_count; + /// Total number of story forwards/reposts public int forwards_count; /// Number of reactions that were added to the story public int reactions_count; /// Story view date and reaction information public StoryViewBase[] views; + /// Mentioned chats public Dictionary chats; /// Mentioned users public Dictionary users; @@ -16177,20 +16261,26 @@ namespace TL flipped = 0x2, } } - /// See + /// Represents a channel post. See [TLDef(0x770416AF)] public class MediaAreaChannelPost : MediaArea { + /// The size and location of the media area corresponding to the location sticker on top of the story media. public MediaAreaCoordinates coordinates; + /// The channel that posted the message public long channel_id; + /// ID of the channel message public int msg_id; } - /// See + /// Represents a channel post See [TLDef(0x2271F2BF)] public class InputMediaAreaChannelPost : MediaArea { + /// The size and location of the media area corresponding to the location sticker on top of the story media. public MediaAreaCoordinates coordinates; + /// The channel that posted the message public InputChannelBase channel; + /// ID of the channel message public int msg_id; } @@ -16643,9 +16733,9 @@ namespace TL { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; - /// Color palette ID, see here » for more info. + /// Color palette ID, see here » for more info; if not set, the default palette should be used. [IfFlag(0)] public int color; - /// Custom emoji ID used to generate the pattern. + /// Optional custom emoji ID used to generate the pattern. [IfFlag(1)] public long background_emoji_id; [Flags] public enum Flags : uint @@ -16690,6 +16780,7 @@ namespace TL [IfFlag(1)] public Help_PeerColorSetBase colors; /// Dark mode palette. Optional, defaults to the palette in colors (or the autogenerated palette for IDs 0 to 6) if absent. [IfFlag(2)] public Help_PeerColorSetBase dark_colors; + /// Channels can use this palette only after reaching at least the boost level specified in this field. [IfFlag(3)] public int channel_min_level; [Flags] public enum Flags : uint @@ -16716,40 +16807,51 @@ namespace TL public Help_PeerColorOption[] colors; } - /// See Derived classes: , , + /// How a certain peer reacted to or interacted with a story See Derived classes: , , public abstract class StoryReactionBase : IObject { } - /// See + /// How a certain peer reacted to a story See [TLDef(0x6090D6D5)] public class StoryReaction : StoryReactionBase { + /// The peer public Peer peer_id; + /// Reaction date public DateTime date; + /// The reaction public Reaction reaction; } - /// See + /// A certain peer has forwarded the story as a message to a public chat or channel. See [TLDef(0xBBAB2643)] public class StoryReactionPublicForward : StoryReactionBase { + /// The message with the forwarded story. public MessageBase message; } - /// See + /// A certain peer has reposted the story. See [TLDef(0xCFCD0F13)] public class StoryReactionPublicRepost : StoryReactionBase { + /// The peer that reposted the story. public Peer peer_id; + /// The reposted story. public StoryItemBase story; } - /// See + /// List of peers that reacted to or intercated with a specific story See [TLDef(0xAA5F789C)] public class Stories_StoryReactionsList : IObject, IPeerResolver { /// Extra bits of information, use flags.HasFlag(...) to test for those public Flags flags; + /// Total number of reactions matching query public int count; + /// List of peers that reacted to or interacted with a specific story public StoryReactionBase[] reactions; + /// Mentioned chats public Dictionary chats; + /// Mentioned users public Dictionary users; + /// If set, indicates the next offset to use to load more results by invoking Stories_GetStoryReactionsList. [IfFlag(0)] public string next_offset; [Flags] public enum Flags : uint @@ -16836,4 +16938,11 @@ namespace TL public SavedReactionTag[] tags; public long hash; } + + /// See + [TLDef(0x3BB842AC)] + public class OutboxReadDate : IObject + { + public DateTime date; + } } diff --git a/src/TL.SchemaFuncs.cs b/src/TL.SchemaFuncs.cs index 972078c..97933cb 100644 --- a/src/TL.SchemaFuncs.cs +++ b/src/TL.SchemaFuncs.cs @@ -990,7 +990,7 @@ namespace TL { }); - /// Get all available chat themes See + /// Get all available chat themes ». See /// Hash for pagination, for more info click here /// a null value means account.themesNotModified public static Task Account_GetChatThemes(this Client client, long hash = default) @@ -1175,7 +1175,7 @@ namespace TL hash = hash, }); - /// See [bots: ✓] + /// Get a list of default suggested channel emoji statuses. See [bots: ✓] /// Hash for pagination, for more info click here /// a null value means account.emojiStatusesNotModified public static Task Account_GetChannelDefaultEmojiStatuses(this Client client, long hash = default) @@ -1184,7 +1184,7 @@ namespace TL hash = hash, }); - /// See [bots: ✓] + /// Returns fetch the full list of custom emoji IDs » that cannot be used in channel emoji statuses ». See [bots: ✓] /// Hash for pagination, for more info click here /// a null value means emojiListNotModified public static Task Account_GetChannelRestrictedStatusEmojis(this Client client, long hash = default) @@ -1219,6 +1219,13 @@ namespace TL errors = errors, }); + /// See + public static Task Users_GetIsPremiumRequiredToContact(this Client client, params InputUserBase[] id) + => client.Invoke(new Users_GetIsPremiumRequiredToContact + { + id = id, + }); + /// Get the telegram IDs of all contacts.
Returns an array of Telegram user IDs for all contacts (0 if a contact does not have an associated Telegram account or have hidden their account using privacy settings). See
/// Hash for pagination, for more info click here public static Task Contacts_GetContactIDs(this Client client, long hash = default) @@ -1348,7 +1355,7 @@ namespace TL peer = peer, }); - /// Delete saved contacts See + /// Removes all contacts without an associated Telegram account. See public static Task Contacts_ResetSaved(this Client client) => client.Invoke(new Contacts_ResetSaved { @@ -3299,8 +3306,8 @@ namespace TL /// Get message reaction list, along with the sender of each reaction. See Possible codes: 400,403 (details) /// Peer /// Message ID - /// Get only reactions of this type (UTF8 emoji) - /// Offset (typically taken from the next_offset field of the returned ) + /// Get only reactions of this type + /// Offset for pagination (taken from the next_offset field of the returned ); empty in the first request. /// Maximum number of results to return, see pagination public static Task Messages_GetMessageReactionsList(this Client client, InputPeer peer, int id, int limit = int.MaxValue, Reaction reaction = null, string offset = null) => client.Invoke(new Messages_GetMessageReactionsList @@ -3627,10 +3634,11 @@ namespace TL { }); - /// Send a chosen peer, as requested by a button. See [bots: ✓] + /// Send one or more chosen peers, as requested by a button. See [bots: ✓] /// The bot that sent the button. /// ID of the message that contained the reply keyboard with the button. /// The button_id field from the . + /// The chosen peers. public static Task Messages_SendBotRequestedPeer(this Client client, InputPeer peer, int msg_id, int button_id, params InputPeer[] requested_peers) => client.Invoke(new Messages_SendBotRequestedPeer { @@ -3839,6 +3847,14 @@ namespace TL hash = hash, }); + /// See + public static Task Messages_GetOutboxReadDate(this Client client, InputPeer peer, int msg_id) + => client.Invoke(new Messages_GetOutboxReadDate + { + peer = peer, + msg_id = msg_id, + }); + /// Returns a current state of updates. See [bots: ✓] public static Task Updates_GetState(this Client client) => client.Invoke(new Updates_GetState @@ -4851,6 +4867,7 @@ namespace TL }); /// Update the accent color and background custom emoji » of a channel. See Possible codes: 400 (details) + /// Whether to change the accent color emoji pattern of the profile page; otherwise, the accent color and emoji pattern of messages will be changed. /// Channel whose accent color should be changed. /// ID of the accent color palette » to use (not RGB24, see here » for more info). /// Custom emoji ID used in the accent color pattern. @@ -4881,7 +4898,9 @@ namespace TL channel = channel, }); - /// See [bots: ✓] + /// Set an emoji status for a channel. See [bots: ✓] + /// The channel, must have at least channel_emoji_status_level_min boosts. + /// Emoji status to set public static Task Channels_UpdateEmojiStatus(this Client client, InputChannelBase channel, EmojiStatus emoji_status) => client.Invoke(new Channels_UpdateEmojiStatus { @@ -5782,6 +5801,7 @@ namespace TL /// Obtains a list of messages, indicating to which other public channels was a channel message forwarded.
Will return a list of messages with peer_id equal to the public channel to which this message was forwarded. See Possible codes: 400 (details)
/// Source channel /// Source message ID + /// Offset for pagination, empty string on first call, then use the next_offset field of the returned constructor (if present, otherwise no more results are available). /// Maximum number of results to return, see pagination public static Task Stats_GetMessagePublicForwards(this Client client, InputChannelBase channel, int msg_id, string offset, int limit = int.MaxValue) => client.Invoke(new Stats_GetMessagePublicForwards @@ -6093,7 +6113,8 @@ namespace TL /// Obtain the list of users that have viewed a specific story we posted See Possible codes: 400 (details) /// Whether to only fetch view reaction/views made by our contacts - /// Whether to return info about users that reacted to the story (i.e. if set, the server will first sort results by view date as usual, and then also additionally sort the list by putting s with an associated reaction first in the list). + /// Whether to return info about users that reacted to the story (i.e. if set, the server will first sort results by view date as usual, and then also additionally sort the list by putting s with an associated reaction first in the list). Ignored if forwards_first is set. + /// If set, returns forwards and reposts first, then reactions, then other views; otherwise returns interactions sorted just by interaction date. /// Peer where the story was posted /// Search for specific peers /// Story ID @@ -6205,7 +6226,12 @@ namespace TL hidden = hidden, }); - /// See [bots: ✓] + /// Get the reaction and interaction list of a story posted to a channel, along with the sender of each reaction. See [bots: ✓] + /// If set, returns forwards and reposts first, then reactions, then other views; otherwise returns interactions sorted just by interaction date. + /// Channel + /// Story ID + /// Get only reactions of this type + /// Offset for pagination (taken from the next_offset field of the returned ); empty in the first request. /// Maximum number of results to return, see pagination public static Task Stories_GetStoryReactionsList(this Client client, InputPeer peer, int id, int limit = int.MaxValue, Reaction reaction = null, string offset = null, bool forwards_first = false) => client.Invoke(new Stories_GetStoryReactionsList @@ -7201,6 +7227,12 @@ namespace TL.Methods public SecureValueErrorBase[] errors; } + [TLDef(0xA622AA10)] + public class Users_GetIsPremiumRequiredToContact : IMethod + { + public InputUserBase[] id; + } + [TLDef(0x7ADC669D)] public class Contacts_GetContactIDs : IMethod { @@ -9455,6 +9487,13 @@ namespace TL.Methods public long hash; } + [TLDef(0x8C4BFE5D)] + public class Messages_GetOutboxReadDate : IMethod + { + public InputPeer peer; + public int msg_id; + } + [TLDef(0xEDD4882A)] public class Updates_GetState : IMethod { } diff --git a/src/TL.Table.cs b/src/TL.Table.cs index d776f61..d807a6a 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 = 171; // fetched 16/01/2024 17:09:52 + public const int Version = 172; // fetched 18/01/2024 14:49:18 internal const int SecretChats = 144; internal const int MTProto2 = 73; internal const uint VectorCtor = 0x1CB5C415; @@ -127,9 +127,9 @@ namespace TL [0x09D05049] = null,//UserStatusEmpty [0xEDB93949] = typeof(UserStatusOnline), [0x008C703F] = typeof(UserStatusOffline), - [0xE26F42F1] = typeof(UserStatusRecently), - [0x07BF09FC] = typeof(UserStatusLastWeek), - [0x77EBC742] = typeof(UserStatusLastMonth), + [0x7B197DC8] = typeof(UserStatusRecently), + [0x541A1D1A] = typeof(UserStatusLastWeek), + [0x65899777] = typeof(UserStatusLastMonth), [0x29562865] = typeof(ChatEmpty), [0x41CBF256] = typeof(Chat), [0x6592A1A7] = typeof(ChatForbidden), @@ -1188,6 +1188,7 @@ namespace TL [0xCB6FF828] = typeof(SavedReactionTag), [0x889B59EF] = null,//Messages_SavedReactionTagsNotModified [0x3259950A] = typeof(Messages_SavedReactionTags), + [0x3BB842AC] = typeof(OutboxReadDate), // from TL.Secret: [0x6ABD9782] = typeof(Layer143.DecryptedMessageMediaDocument), [0x91CC4674] = typeof(Layer73.DecryptedMessage), diff --git a/src/WTelegramClient.csproj b/src/WTelegramClient.csproj index a4f45ff..3f5365f 100644 --- a/src/WTelegramClient.csproj +++ b/src/WTelegramClient.csproj @@ -13,8 +13,8 @@ WTelegramClient 0.0.0 Wizou - Telegram Client API (MTProto) library written 100% in C# and .NET Standard | Latest API layer: 171 Release Notes: $(ReleaseNotes.Replace("|", "%0D%0A").Replace(" - ","%0D%0A- ").Replace(" ", "%0D%0A%0D%0A")) - Copyright © Olivier Marcoux 2021-2023 + Telegram Client API (MTProto) library written 100% in C# and .NET Standard | Latest API layer: 172 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 logo.png