diff --git a/.github/dev.yml b/.github/dev.yml index 2e48a81..0ea038b 100644 --- a/.github/dev.yml +++ b/.github/dev.yml @@ -2,7 +2,7 @@ pr: none trigger: - master -name: 1.8.1-dev.$(Rev:r) +name: 1.8.2-dev.$(Rev:r) pool: vmImage: ubuntu-latest diff --git a/src/TL.Helpers.cs b/src/TL.Helpers.cs index 01bb1ef..3e982e6 100644 --- a/src/TL.Helpers.cs +++ b/src/TL.Helpers.cs @@ -15,9 +15,10 @@ namespace TL } partial class InputPeer { public static InputPeerSelf Self => new(); } - partial class InputPeerUser { public static implicit operator InputUser(InputPeerUser user) => new() { user_id = user.user_id, access_hash = user.access_hash }; } - partial class InputPeerChannel { public static implicit operator InputChannel(InputPeerChannel channel) => new() { channel_id = channel.channel_id, access_hash = channel.access_hash }; } partial class InputUser { public static InputUserSelf Self => new(); } + partial class InputPeerChannel { public static implicit operator InputChannel(InputPeerChannel channel) => new() { channel_id = channel.channel_id, access_hash = channel.access_hash }; } + partial class InputPeerUser { public static implicit operator InputUser(InputPeerUser user) => new() { user_id = user.user_id, access_hash = user.access_hash }; } + partial class InputUser { public static implicit operator InputPeerUser(InputUser user) => new() { user_id = user.user_id, access_hash = user.access_hash }; } partial class InputFileBase { @@ -64,9 +65,9 @@ namespace TL public abstract long ID { get; } public abstract bool IsActive { get; } public abstract InputPeer ToInputPeer(); - protected abstract InputUserBase ToInputUser(); + protected abstract InputUser ToInputUser(); public static implicit operator InputPeer(UserBase user) => user.ToInputPeer(); - public static implicit operator InputUserBase(UserBase user) => user.ToInputUser(); + public static implicit operator InputUser(UserBase user) => user.ToInputUser(); } partial class UserEmpty { @@ -74,7 +75,7 @@ namespace TL public override bool IsActive => false; public override string ToString() => null; public override InputPeer ToInputPeer() => null; - protected override InputUserBase ToInputUser() => null; + protected override InputUser ToInputUser() => null; } partial class User { @@ -82,7 +83,7 @@ namespace TL public override bool IsActive => (flags & Flags.deleted) == 0; public override string ToString() => username != null ? '@' + username : last_name == null ? first_name : $"{first_name} {last_name}"; public override InputPeer ToInputPeer() => new InputPeerUser { user_id = id, access_hash = access_hash }; - protected override InputUserBase ToInputUser() => new InputUser { user_id = id, access_hash = access_hash }; + protected override InputUser ToInputUser() => new() { user_id = id, access_hash = access_hash }; /// An estimation of the number of days ago the user was last seen (Online=0, Recently=1, LastWeek=5, LastMonth=20, LongTimeAgo=150) public TimeSpan LastSeenAgo => status?.LastSeenAgo ?? TimeSpan.FromDays(150); } diff --git a/src/TL.Schema.cs b/src/TL.Schema.cs index 9c0f586..ea62130 100644 --- a/src/TL.Schema.cs +++ b/src/TL.Schema.cs @@ -1040,10 +1040,28 @@ namespace TL public abstract long ID { get; } /// About string for this chat public abstract string About { get; } + /// Chat photo + public abstract PhotoBase ChatPhoto { get; } /// Notification settings public abstract PeerNotifySettings NotifySettings { get; } + /// Chat invite + public abstract ExportedChatInvite ExportedInvite { get; } + /// Info about bots that are in this chat + public abstract BotInfo[] BotInfo { get; } + /// Message ID of the last pinned message + public abstract int PinnedMsg { get; } /// Peer folder ID, for more info click here public abstract int Folder { get; } + /// Group call information + public abstract InputGroupCall Call { get; } + /// Time-To-Live of messages sent by the current user to this chat + public abstract int TtlPeriod { get; } + /// When using phone.getGroupCallJoinAs to get a list of peers that can be used to join a group call, this field indicates the peer that should be selected by default. + public abstract Peer GroupcallDefaultJoinAs { get; } + /// Emoji representing a specific chat theme + public abstract string ThemeEmoticon { get; } + public abstract int RequestsPending { get; } + public abstract long[] RecentRequesters { get; } } /// Detailed chat info See [TLDef(0x46A6FFB4)] @@ -1112,10 +1130,28 @@ namespace TL public override long ID => id; /// About string for this chat public override string About => about; + /// Chat photo + public override PhotoBase ChatPhoto => chat_photo; /// Notification settings public override PeerNotifySettings NotifySettings => notify_settings; + /// Chat invite + public override ExportedChatInvite ExportedInvite => exported_invite; + /// Info about bots that are in this chat + public override BotInfo[] BotInfo => bot_info; + /// Message ID of the last pinned message + public override int PinnedMsg => pinned_msg_id; /// Peer folder ID, for more info click here public override int Folder => folder_id; + /// Group call information + public override InputGroupCall Call => call; + /// Time-To-Live of messages sent by the current user to this chat + public override int TtlPeriod => ttl_period; + /// When using phone.getGroupCallJoinAs to get a list of peers that can be used to join a group call, this field indicates the peer that should be selected by default. + public override Peer GroupcallDefaultJoinAs => groupcall_default_join_as; + /// Emoji representing a specific chat theme + public override string ThemeEmoticon => theme_emoticon; + public override int RequestsPending => requests_pending; + public override long[] RecentRequesters => recent_requesters; } /// Full info about a channel/supergroup See [TLDef(0x56662E2E)] @@ -1257,10 +1293,28 @@ namespace TL public override long ID => id; /// Info about the channel public override string About => about; + /// Channel picture + public override PhotoBase ChatPhoto => chat_photo; /// Notification settings public override PeerNotifySettings NotifySettings => notify_settings; + /// Invite link + public override ExportedChatInvite ExportedInvite => exported_invite; + /// Info about bots in the channel/supergrup + public override BotInfo[] BotInfo => bot_info; + /// Message ID of the last pinned message + public override int PinnedMsg => pinned_msg_id; /// Peer folder ID, for more info click here public override int Folder => folder_id; + /// Livestream or group call information + public override InputGroupCall Call => call; + /// Time-To-Live of messages in this channel or supergroup + public override int TtlPeriod => ttl_period; + /// When using phone.getGroupCallJoinAs to get a list of peers that can be used to join a group call, this field indicates the peer that should be selected by default. + public override Peer GroupcallDefaultJoinAs => groupcall_default_join_as; + /// Emoji representing a specific chat theme + public override string ThemeEmoticon => theme_emoticon; + public override int RequestsPending => requests_pending; + public override long[] RecentRequesters => recent_requesters; } /// Details of a group member. Derived classes: , , See @@ -6989,6 +7043,10 @@ namespace TL public abstract string ID { get; } /// Result type (see bot API docs) public abstract string Type { get; } + /// Result title + public abstract string Title { get; } + /// Result description + public abstract string Description { get; } /// Message to send public abstract BotInlineMessage SendMessage { get; } } @@ -7033,6 +7091,10 @@ namespace TL public override string ID => id; /// Result type (see bot API docs) public override string Type => type; + /// Result title + public override string Title => title; + /// Result description + public override string Description => description; /// Message to send public override BotInlineMessage SendMessage => send_message; } @@ -7073,6 +7135,10 @@ namespace TL public override string ID => id; /// Result type (see bot API docs) public override string Type => type; + /// Result title + public override string Title => title; + /// Description + public override string Description => description; /// Depending on the type and on the , contains the caption of the media or the content of the message to be sent instead of the media public override BotInlineMessage SendMessage => send_message; }