From 4f7954db6153eae5ead0b547df140c9bae9579a9 Mon Sep 17 00:00:00 2001
From: Wizou <11647984+wiz0u@users.noreply.github.com>
Date: Tue, 24 Jun 2025 19:25:30 +0200
Subject: [PATCH] API Layer 204: Channel DMs (MonoForum), Forum Tabs, Saved
peer/dialog stuff...
(for the very latest layers, go to https://patreon.com/wizou)
---
README.md | 2 +-
src/TL.Schema.cs | 106 +++++++++++++++++++++---
src/TL.SchemaFuncs.cs | 164 ++++++++++++++++++++++++++++++-------
src/TL.Table.cs | 20 +++--
src/WTelegramClient.csproj | 5 +-
5 files changed, 245 insertions(+), 52 deletions(-)
diff --git a/README.md b/README.md
index 557ce41..84117c0 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 c05334e..0208090 100644
--- a/src/TL.Schema.cs
+++ b/src/TL.Schema.cs
@@ -1074,7 +1074,7 @@ namespace TL
public override string Title => title;
}
/// Channel/supergroup info See
- [TLDef(0x7482147E)]
+ [TLDef(0xFE685355)]
public sealed partial class Channel : ChatBase
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
@@ -1119,6 +1119,7 @@ namespace TL
[IfFlag(43)] public DateTime subscription_until_date;
[IfFlag(45)] public long bot_verification_icon;
[IfFlag(46)] public long send_paid_messages_stars;
+ [IfFlag(50)] public long linked_monoforum_id;
[Flags] public enum Flags : uint
{
@@ -1205,6 +1206,11 @@ namespace TL
/// Field has a value
has_send_paid_messages_stars = 0x4000,
autotranslation = 0x8000,
+ broadcast_messages_allowed = 0x10000,
+ monoforum = 0x20000,
+ /// Field has a value
+ has_linked_monoforum_id = 0x40000,
+ forum_tabs = 0x80000,
}
/// ID of the channel, see here » for more info
@@ -2961,10 +2967,16 @@ namespace TL
public long stars;
}
/// See
- [TLDef(0xBCD71419)]
+ [TLDef(0x84B88578)]
public sealed partial class MessageActionPaidMessagesPrice : MessageAction
{
+ public Flags flags;
public long stars;
+
+ [Flags] public enum Flags : uint
+ {
+ broadcast_messages_allowed = 0x1,
+ }
}
/// See
[TLDef(0x2FFE2F7A)]
@@ -4650,7 +4662,7 @@ namespace TL
public int max_id;
}
/// Notifies a change of a message draft. See
- [TLDef(0x1B49EC6D)]
+ [TLDef(0xEDFC111E)]
public sealed partial class UpdateDraftMessage : Update
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
@@ -4659,6 +4671,7 @@ namespace TL
public Peer peer;
/// ID of the forum topic to which the draft is associated
[IfFlag(0)] public int top_msg_id;
+ [IfFlag(1)] public Peer saved_peer_id;
/// The draft
public DraftMessageBase draft;
@@ -4666,6 +4679,8 @@ namespace TL
{
/// Field has a value
has_top_msg_id = 0x1,
+ /// Field has a value
+ has_saved_peer_id = 0x2,
}
}
/// Some featured stickers were marked as read See
@@ -4812,7 +4827,7 @@ namespace TL
[TLDef(0xE511996D)]
public sealed partial class UpdateFavedStickers : Update { }
/// The specified channel/supergroup messages were read See
- [TLDef(0xEA29055D)]
+ [TLDef(0x25F324F7)]
public sealed partial class UpdateChannelReadMessagesContents : Update
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
@@ -4821,6 +4836,7 @@ namespace TL
public long channel_id;
/// Forum topic ID.
[IfFlag(0)] public int top_msg_id;
+ [IfFlag(1)] public Peer saved_peer_id;
/// IDs of messages that were read
public int[] messages;
@@ -4828,6 +4844,8 @@ namespace TL
{
/// Field has a value
has_top_msg_id = 0x1,
+ /// Field has a value
+ has_saved_peer_id = 0x2,
}
}
/// All contacts were deleted See
@@ -4841,18 +4859,21 @@ namespace TL
public int available_min_id;
}
/// The manual unread mark of a chat was changed See
- [TLDef(0xE16459C3)]
+ [TLDef(0xB658F23E)]
public sealed partial class UpdateDialogUnreadMark : Update
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
/// The dialog
public DialogPeerBase peer;
+ [IfFlag(1)] public Peer saved_peer_id;
[Flags] public enum Flags : uint
{
/// Was the chat marked or unmarked as read
unread = 0x1,
+ /// Field has a value
+ has_saved_peer_id = 0x2,
}
}
/// The results of a poll have changed See
@@ -5332,7 +5353,7 @@ namespace TL
public override (long, int, int) GetMBox() => (-1, qts, 1);
}
/// New message reactions » are available See
- [TLDef(0x5E1B3CB8)]
+ [TLDef(0x1E297BFA)]
public sealed partial class UpdateMessageReactions : Update
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
@@ -5343,6 +5364,7 @@ namespace TL
public int msg_id;
/// Forum topic ID
[IfFlag(0)] public int top_msg_id;
+ [IfFlag(1)] public Peer saved_peer_id;
/// Reactions
public MessageReactions reactions;
@@ -5350,6 +5372,8 @@ namespace TL
{
/// Field has a value
has_top_msg_id = 0x1,
+ /// Field has a value
+ has_saved_peer_id = 0x2,
}
}
/// The list of installed attachment menu entries » has changed, use Messages_GetAttachMenuBots to fetch the updated list. See
@@ -5852,6 +5876,22 @@ namespace TL
public byte[][] blocks;
public int next_offset;
}
+ /// See
+ [TLDef(0x77B0E372)]
+ public sealed partial class UpdateReadMonoForumInbox : Update
+ {
+ public long channel_id;
+ public Peer saved_peer_id;
+ public int read_max_id;
+ }
+ /// See
+ [TLDef(0xA4A79376)]
+ public sealed partial class UpdateReadMonoForumOutbox : Update
+ {
+ public long channel_id;
+ public Peer saved_peer_id;
+ public int read_max_id;
+ }
/// Updates state. See
[TLDef(0xA56C2A3E)]
@@ -17484,7 +17524,7 @@ namespace TL
/// Contains info about a message or story to reply to. See Derived classes: ,
public abstract partial class InputReplyTo : IObject { }
/// Reply to a message. See
- [TLDef(0x22C0F6D5)]
+ [TLDef(0xB07038B0)]
public sealed partial class InputReplyToMessage : InputReplyTo
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
@@ -17501,6 +17541,7 @@ namespace TL
[IfFlag(3)] public MessageEntity[] quote_entities;
/// Offset of the message quote_text within the original message (in UTF-16 code units).
[IfFlag(4)] public int quote_offset;
+ [IfFlag(5)] public InputPeer monoforum_peer_id;
[Flags] public enum Flags : uint
{
@@ -17514,6 +17555,8 @@ namespace TL
has_quote_entities = 0x8,
/// Field has a value
has_quote_offset = 0x10,
+ /// Field has a value
+ has_monoforum_peer_id = 0x20,
}
}
/// Reply to a story. See
@@ -17525,6 +17568,12 @@ namespace TL
/// ID of the story to reply to.
public int story_id;
}
+ /// See
+ [TLDef(0x69D66C45)]
+ public sealed partial class InputReplyToMonoForum : InputReplyTo
+ {
+ public InputPeer monoforum_peer_id;
+ }
/// Represents a story deep link. See
[TLDef(0x3FC9053B)]
@@ -18336,9 +18385,17 @@ namespace TL
public IPeerInfo UserOrChat(Peer peer) => peer?.UserOrChat(users, chats);
}
+ /// Represents a saved message dialog ». See Derived classes:
+ public abstract partial class SavedDialogBase : IObject
+ {
+ /// The dialog
+ public virtual Peer Peer => default;
+ /// The latest message ID
+ public virtual int TopMessage => default;
+ }
/// Represents a saved dialog ». See
[TLDef(0xBD87CB6C)]
- public sealed partial class SavedDialog : IObject
+ public sealed partial class SavedDialog : SavedDialogBase
{
/// Extra bits of information, use flags.HasFlag(...) to test for those
public Flags flags;
@@ -18352,13 +18409,40 @@ namespace TL
/// Is the dialog pinned
pinned = 0x4,
}
+
+ /// The dialog
+ public override Peer Peer => peer;
+ /// The latest message ID
+ public override int TopMessage => top_message;
+ }
+ /// See
+ [TLDef(0x64407EA7)]
+ public sealed partial class MonoForumDialog : SavedDialogBase
+ {
+ public Flags flags;
+ public Peer peer;
+ public int top_message;
+ public int read_inbox_max_id;
+ public int read_outbox_max_id;
+ public int unread_count;
+ public int unread_reactions_count;
+ [IfFlag(1)] public DraftMessageBase draft;
+
+ [Flags] public enum Flags : uint
+ {
+ has_draft = 0x2,
+ unread_mark = 0x8,
+ }
+
+ public override Peer Peer => peer;
+ public override int TopMessage => top_message;
}
/// Represents some saved message dialogs ». See Derived classes: , ,
public abstract partial class Messages_SavedDialogsBase : IObject
{
/// Saved message dialogs ».
- public virtual SavedDialog[] Dialogs => default;
+ public virtual SavedDialogBase[] Dialogs => default;
/// List of last messages from each saved dialog
public virtual MessageBase[] Messages => default;
/// Mentioned chats
@@ -18371,7 +18455,7 @@ namespace TL
public partial class Messages_SavedDialogs : Messages_SavedDialogsBase, IPeerResolver
{
/// Saved message dialogs ».
- public SavedDialog[] dialogs;
+ public SavedDialogBase[] dialogs;
/// List of last messages from each saved dialog
public MessageBase[] messages;
/// Mentioned chats
@@ -18380,7 +18464,7 @@ namespace TL
public Dictionary users;
/// Saved message dialogs ».
- public override SavedDialog[] Dialogs => dialogs;
+ public override SavedDialogBase[] Dialogs => dialogs;
/// List of last messages from each saved dialog
public override MessageBase[] Messages => messages;
/// Mentioned chats
diff --git a/src/TL.SchemaFuncs.cs b/src/TL.SchemaFuncs.cs
index e872cc4..2cc521c 100644
--- a/src/TL.SchemaFuncs.cs
+++ b/src/TL.SchemaFuncs.cs
@@ -1972,15 +1972,16 @@ namespace TL
/// Scheduled message date for scheduled messages
/// Forward the messages as the specified peer
/// Add the messages to the specified quick reply shortcut », instead.
- public static Task Messages_ForwardMessages(this Client client, InputPeer from_peer, int[] id, long[] random_id, InputPeer to_peer, int? top_msg_id = null, DateTime? schedule_date = null, InputPeer send_as = null, InputQuickReplyShortcutBase quick_reply_shortcut = null, int? video_timestamp = null, long? allow_paid_stars = null, bool silent = false, bool background = false, bool with_my_score = false, bool drop_author = false, bool drop_media_captions = false, bool noforwards = false, bool allow_paid_floodskip = false)
+ public static Task Messages_ForwardMessages(this Client client, InputPeer from_peer, int[] id, long[] random_id, InputPeer to_peer, int? top_msg_id = null, DateTime? schedule_date = null, InputPeer send_as = null, InputQuickReplyShortcutBase quick_reply_shortcut = null, int? video_timestamp = null, long? allow_paid_stars = null, InputReplyTo reply_to = null, bool silent = false, bool background = false, bool with_my_score = false, bool drop_author = false, bool drop_media_captions = false, bool noforwards = false, bool allow_paid_floodskip = false)
=> client.Invoke(new Messages_ForwardMessages
{
- flags = (Messages_ForwardMessages.Flags)((top_msg_id != null ? 0x200 : 0) | (schedule_date != null ? 0x400 : 0) | (send_as != null ? 0x2000 : 0) | (quick_reply_shortcut != null ? 0x20000 : 0) | (video_timestamp != null ? 0x100000 : 0) | (allow_paid_stars != null ? 0x200000 : 0) | (silent ? 0x20 : 0) | (background ? 0x40 : 0) | (with_my_score ? 0x100 : 0) | (drop_author ? 0x800 : 0) | (drop_media_captions ? 0x1000 : 0) | (noforwards ? 0x4000 : 0) | (allow_paid_floodskip ? 0x80000 : 0)),
+ flags = (Messages_ForwardMessages.Flags)((top_msg_id != null ? 0x200 : 0) | (schedule_date != null ? 0x400 : 0) | (send_as != null ? 0x2000 : 0) | (quick_reply_shortcut != null ? 0x20000 : 0) | (video_timestamp != null ? 0x100000 : 0) | (allow_paid_stars != null ? 0x200000 : 0) | (reply_to != null ? 0x400000 : 0) | (silent ? 0x20 : 0) | (background ? 0x40 : 0) | (with_my_score ? 0x100 : 0) | (drop_author ? 0x800 : 0) | (drop_media_captions ? 0x1000 : 0) | (noforwards ? 0x4000 : 0) | (allow_paid_floodskip ? 0x80000 : 0)),
from_peer = from_peer,
id = id,
random_id = random_id,
to_peer = to_peer,
top_msg_id = top_msg_id ?? default,
+ reply_to = reply_to,
schedule_date = schedule_date ?? default,
send_as = send_as,
quick_reply_shortcut = quick_reply_shortcut,
@@ -2978,17 +2979,20 @@ namespace TL
/// Manually mark dialog as unread See Possible codes: 400 (details)
/// Mark as unread/read
/// Dialog
- public static Task Messages_MarkDialogUnread(this Client client, InputDialogPeerBase peer, bool unread = false)
+ public static Task Messages_MarkDialogUnread(this Client client, InputDialogPeerBase peer, InputPeer parent_peer = null, bool unread = false)
=> client.Invoke(new Messages_MarkDialogUnread
{
- flags = (Messages_MarkDialogUnread.Flags)(unread ? 0x1 : 0),
+ flags = (Messages_MarkDialogUnread.Flags)((parent_peer != null ? 0x2 : 0) | (unread ? 0x1 : 0)),
+ parent_peer = parent_peer,
peer = peer,
});
/// Get dialogs manually marked as unread See
- public static Task Messages_GetDialogUnreadMarks(this Client client)
+ public static Task Messages_GetDialogUnreadMarks(this Client client, InputPeer parent_peer = null)
=> client.Invoke(new Messages_GetDialogUnreadMarks
{
+ flags = (Messages_GetDialogUnreadMarks.Flags)(parent_peer != null ? 0x1 : 0),
+ parent_peer = parent_peer,
});
/// Clear all drafts. See
@@ -3312,12 +3316,13 @@ namespace TL
/// Unpin all pinned messages See [bots: ✓] Possible codes: 400 (details)
/// Chat where to unpin
/// Forum topic where to unpin
- public static Task Messages_UnpinAllMessages(this Client client, InputPeer peer, int? top_msg_id = null)
+ public static Task Messages_UnpinAllMessages(this Client client, InputPeer peer, int? top_msg_id = null, InputPeer saved_peer_id = null)
=> client.InvokeAffected(new Messages_UnpinAllMessages
{
- flags = (Messages_UnpinAllMessages.Flags)(top_msg_id != null ? 0x1 : 0),
+ flags = (Messages_UnpinAllMessages.Flags)((top_msg_id != null ? 0x1 : 0) | (saved_peer_id != null ? 0x2 : 0)),
peer = peer,
top_msg_id = top_msg_id ?? default,
+ saved_peer_id = saved_peer_id,
}, peer is InputPeerChannel ipc ? ipc.channel_id : 0);
/// ⚠ This method is only for basic Chat. See Terminology in the README to understand what this means
Search for a similar method name starting with Channels_ if you're dealing with a Delete a chat See Possible codes: 400 (details)
@@ -3691,12 +3696,13 @@ namespace TL
/// Maximum number of results to return, see pagination
/// Only return reactions for messages up until this message ID
/// Only return reactions for messages starting from this message ID
- public static Task Messages_GetUnreadReactions(this Client client, InputPeer peer, int offset_id = default, int add_offset = default, int limit = int.MaxValue, int max_id = default, int min_id = default, int? top_msg_id = null)
+ public static Task Messages_GetUnreadReactions(this Client client, InputPeer peer, int offset_id = default, int add_offset = default, int limit = int.MaxValue, int max_id = default, int min_id = default, int? top_msg_id = null, InputPeer saved_peer_id = null)
=> client.Invoke(new Messages_GetUnreadReactions
{
- flags = (Messages_GetUnreadReactions.Flags)(top_msg_id != null ? 0x1 : 0),
+ flags = (Messages_GetUnreadReactions.Flags)((top_msg_id != null ? 0x1 : 0) | (saved_peer_id != null ? 0x2 : 0)),
peer = peer,
top_msg_id = top_msg_id ?? default,
+ saved_peer_id = saved_peer_id,
offset_id = offset_id,
add_offset = add_offset,
limit = limit,
@@ -3707,12 +3713,13 @@ namespace TL
/// Mark message reactions » as read See Possible codes: 400 (details)
/// Peer
/// Mark as read only reactions to messages within the specified forum topic
- public static Task Messages_ReadReactions(this Client client, InputPeer peer, int? top_msg_id = null)
+ public static Task Messages_ReadReactions(this Client client, InputPeer peer, int? top_msg_id = null, InputPeer saved_peer_id = null)
=> client.InvokeAffected(new Messages_ReadReactions
{
- flags = (Messages_ReadReactions.Flags)(top_msg_id != null ? 0x1 : 0),
+ flags = (Messages_ReadReactions.Flags)((top_msg_id != null ? 0x1 : 0) | (saved_peer_id != null ? 0x2 : 0)),
peer = peer,
top_msg_id = top_msg_id ?? default,
+ saved_peer_id = saved_peer_id,
}, peer is InputPeerChannel ipc ? ipc.channel_id : 0);
/// View and search recently sent media.
This method does not support pagination. See Possible codes: 400 (details)
@@ -4088,10 +4095,11 @@ namespace TL
/// Offset peer for pagination
/// Number of list elements to be returned
/// Hash used for caching, for more info click here
- public static Task Messages_GetSavedDialogs(this Client client, DateTime offset_date = default, int offset_id = default, InputPeer offset_peer = null, int limit = int.MaxValue, long hash = default, bool exclude_pinned = false)
+ public static Task Messages_GetSavedDialogs(this Client client, DateTime offset_date = default, int offset_id = default, InputPeer offset_peer = null, int limit = int.MaxValue, long hash = default, InputPeer parent_peer = null, bool exclude_pinned = false)
=> client.Invoke(new Messages_GetSavedDialogs
{
- flags = (Messages_GetSavedDialogs.Flags)(exclude_pinned ? 0x1 : 0),
+ flags = (Messages_GetSavedDialogs.Flags)((parent_peer != null ? 0x2 : 0) | (exclude_pinned ? 0x1 : 0)),
+ parent_peer = parent_peer,
offset_date = offset_date,
offset_id = offset_id,
offset_peer = offset_peer,
@@ -4108,9 +4116,11 @@ namespace TL
/// If a positive value was transferred, the method will return only messages with IDs less than max_id
/// If a positive value was transferred, the method will return only messages with IDs more than min_id
/// Result hash
- public static Task Messages_GetSavedHistory(this Client client, InputPeer peer, int offset_id = default, DateTime offset_date = default, int add_offset = default, int limit = int.MaxValue, int max_id = default, int min_id = default, long hash = default)
+ public static Task Messages_GetSavedHistory(this Client client, InputPeer peer, int offset_id = default, DateTime offset_date = default, int add_offset = default, int limit = int.MaxValue, int max_id = default, int min_id = default, long hash = default, InputPeer parent_peer = null)
=> client.Invoke(new Messages_GetSavedHistory
{
+ flags = (Messages_GetSavedHistory.Flags)(parent_peer != null ? 0x1 : 0),
+ parent_peer = parent_peer,
peer = peer,
offset_id = offset_id,
offset_date = offset_date,
@@ -4126,10 +4136,11 @@ namespace TL
/// Maximum ID of message to delete
/// Delete all messages newer than this UNIX timestamp
/// Delete all messages older than this UNIX timestamp
- public static Task Messages_DeleteSavedHistory(this Client client, InputPeer peer, int max_id = default, DateTime? min_date = null, DateTime? max_date = null)
+ public static Task Messages_DeleteSavedHistory(this Client client, InputPeer peer, int max_id = default, InputPeer parent_peer = null, DateTime? min_date = null, DateTime? max_date = null)
=> client.InvokeAffected(new Messages_DeleteSavedHistory
{
- flags = (Messages_DeleteSavedHistory.Flags)((min_date != null ? 0x4 : 0) | (max_date != null ? 0x8 : 0)),
+ flags = (Messages_DeleteSavedHistory.Flags)((parent_peer != null ? 0x1 : 0) | (min_date != null ? 0x4 : 0) | (max_date != null ? 0x8 : 0)),
+ parent_peer = parent_peer,
peer = peer,
max_id = max_id,
min_date = min_date ?? default,
@@ -4496,6 +4507,24 @@ namespace TL
id = id,
});
+ /// See
+ public static Task Messages_GetSavedDialogsByID(this Client client, InputPeer[] ids, InputPeer parent_peer = null)
+ => client.Invoke(new Messages_GetSavedDialogsByID
+ {
+ flags = (Messages_GetSavedDialogsByID.Flags)(parent_peer != null ? 0x2 : 0),
+ parent_peer = parent_peer,
+ ids = ids,
+ });
+
+ /// See
+ public static Task Messages_ReadSavedHistory(this Client client, InputPeer parent_peer, InputPeer peer, int max_id = default)
+ => client.Invoke(new Messages_ReadSavedHistory
+ {
+ parent_peer = parent_peer,
+ peer = peer,
+ max_id = max_id,
+ });
+
/// Returns a current state of updates. See [bots: ✓]
public static Task Updates_GetState(this Client client)
=> client.Invoke(new Updates_GetState
@@ -5352,11 +5381,12 @@ namespace TL
/// Enable or disable forum functionality in a supergroup. See Possible codes: 400 (details)
/// Supergroup ID
/// Enable or disable forum functionality
- public static Task Channels_ToggleForum(this Client client, InputChannelBase channel, bool enabled)
+ public static Task Channels_ToggleForum(this Client client, InputChannelBase channel, bool enabled, bool tabs)
=> client.Invoke(new Channels_ToggleForum
{
channel = channel,
enabled = enabled,
+ tabs = tabs,
});
/// Create a forum topic; requires manage_topics rights. See [bots: ✓] Possible codes: 400,403 (details)
@@ -5580,9 +5610,10 @@ namespace TL
});
/// See
- public static Task Channels_UpdatePaidMessagesPrice(this Client client, InputChannelBase channel, long send_paid_messages_stars)
+ public static Task Channels_UpdatePaidMessagesPrice(this Client client, InputChannelBase channel, long send_paid_messages_stars, bool broadcast_messages_allowed = false)
=> client.Invoke(new Channels_UpdatePaidMessagesPrice
{
+ flags = (Channels_UpdatePaidMessagesPrice.Flags)(broadcast_messages_allowed ? 0x1 : 0),
channel = channel,
send_paid_messages_stars = send_paid_messages_stars,
});
@@ -5595,6 +5626,14 @@ namespace TL
enabled = enabled,
});
+ /// See
+ public static Task Channels_GetMessageAuthor(this Client client, InputChannelBase channel, int id)
+ => client.Invoke(new Channels_GetMessageAuthor
+ {
+ channel = channel,
+ id = id,
+ });
+
/// Sends a custom request; for bots only See [bots: ✓] Possible codes: 400,403 (details)
/// The method name
/// JSON-serialized method parameters
@@ -9238,7 +9277,7 @@ namespace TL.Methods
}
}
- [TLDef(0xBB9FA475)]
+ [TLDef(0x38F0188C)]
public sealed partial class Messages_ForwardMessages : IMethod
{
public Flags flags;
@@ -9247,6 +9286,7 @@ namespace TL.Methods
public long[] random_id;
public InputPeer to_peer;
[IfFlag(9)] public int top_msg_id;
+ [IfFlag(22)] public InputReplyTo reply_to;
[IfFlag(10)] public DateTime schedule_date;
[IfFlag(13)] public InputPeer send_as;
[IfFlag(17)] public InputQuickReplyShortcutBase quick_reply_shortcut;
@@ -9268,6 +9308,7 @@ namespace TL.Methods
allow_paid_floodskip = 0x80000,
has_video_timestamp = 0x100000,
has_allow_paid_stars = 0x200000,
+ has_reply_to = 0x400000,
}
}
@@ -10131,20 +10172,31 @@ namespace TL.Methods
[TLDef(0x1CFF7E08)]
public sealed partial class Messages_GetSplitRanges : IMethod { }
- [TLDef(0xC286D98F)]
+ [TLDef(0x8C5006F8)]
public sealed partial class Messages_MarkDialogUnread : IMethod
{
public Flags flags;
+ [IfFlag(1)] public InputPeer parent_peer;
public InputDialogPeerBase peer;
[Flags] public enum Flags : uint
{
unread = 0x1,
+ has_parent_peer = 0x2,
}
}
- [TLDef(0x22E24E22)]
- public sealed partial class Messages_GetDialogUnreadMarks : IMethod { }
+ [TLDef(0x21202222)]
+ public sealed partial class Messages_GetDialogUnreadMarks : IMethod
+ {
+ public Flags flags;
+ [IfFlag(0)] public InputPeer parent_peer;
+
+ [Flags] public enum Flags : uint
+ {
+ has_parent_peer = 0x1,
+ }
+ }
[TLDef(0x7E58EE9C)]
public sealed partial class Messages_ClearAllDrafts : IMethod { }
@@ -10400,16 +10452,18 @@ namespace TL.Methods
public int read_max_id;
}
- [TLDef(0xEE22B9A8)]
+ [TLDef(0x062DD747)]
public sealed partial class Messages_UnpinAllMessages : IMethod
{
public Flags flags;
public InputPeer peer;
[IfFlag(0)] public int top_msg_id;
+ [IfFlag(1)] public InputPeer saved_peer_id;
[Flags] public enum Flags : uint
{
has_top_msg_id = 0x1,
+ has_saved_peer_id = 0x2,
}
}
@@ -10729,12 +10783,13 @@ namespace TL.Methods
}
}
- [TLDef(0x3223495B)]
+ [TLDef(0xBD7F90AC)]
public sealed partial class Messages_GetUnreadReactions : IMethod
{
public Flags flags;
public InputPeer peer;
[IfFlag(0)] public int top_msg_id;
+ [IfFlag(1)] public InputPeer saved_peer_id;
public int offset_id;
public int add_offset;
public int limit;
@@ -10744,19 +10799,22 @@ namespace TL.Methods
[Flags] public enum Flags : uint
{
has_top_msg_id = 0x1,
+ has_saved_peer_id = 0x2,
}
}
- [TLDef(0x54AA7F8E)]
+ [TLDef(0x9EC44F93)]
public sealed partial class Messages_ReadReactions : IMethod
{
public Flags flags;
public InputPeer peer;
[IfFlag(0)] public int top_msg_id;
+ [IfFlag(1)] public InputPeer saved_peer_id;
[Flags] public enum Flags : uint
{
has_top_msg_id = 0x1,
+ has_saved_peer_id = 0x2,
}
}
@@ -11056,10 +11114,11 @@ namespace TL.Methods
}
}
- [TLDef(0x5381D21A)]
+ [TLDef(0x1E91FC99)]
public sealed partial class Messages_GetSavedDialogs : IMethod
{
public Flags flags;
+ [IfFlag(1)] public InputPeer parent_peer;
public DateTime offset_date;
public int offset_id;
public InputPeer offset_peer;
@@ -11069,12 +11128,15 @@ namespace TL.Methods
[Flags] public enum Flags : uint
{
exclude_pinned = 0x1,
+ has_parent_peer = 0x2,
}
}
- [TLDef(0x3D9A414D)]
+ [TLDef(0x998AB009)]
public sealed partial class Messages_GetSavedHistory : IMethod
{
+ public Flags flags;
+ [IfFlag(0)] public InputPeer parent_peer;
public InputPeer peer;
public int offset_id;
public DateTime offset_date;
@@ -11083,12 +11145,18 @@ namespace TL.Methods
public int max_id;
public int min_id;
public long hash;
+
+ [Flags] public enum Flags : uint
+ {
+ has_parent_peer = 0x1,
+ }
}
- [TLDef(0x6E98102B)]
+ [TLDef(0x4DC5085F)]
public sealed partial class Messages_DeleteSavedHistory : IMethod
{
public Flags flags;
+ [IfFlag(0)] public InputPeer parent_peer;
public InputPeer peer;
public int max_id;
[IfFlag(2)] public DateTime min_date;
@@ -11096,6 +11164,7 @@ namespace TL.Methods
[Flags] public enum Flags : uint
{
+ has_parent_peer = 0x1,
has_min_date = 0x4,
has_max_date = 0x8,
}
@@ -11404,6 +11473,27 @@ namespace TL.Methods
}
}
+ [TLDef(0x6F6F9C96)]
+ public sealed partial class Messages_GetSavedDialogsByID : IMethod
+ {
+ public Flags flags;
+ [IfFlag(1)] public InputPeer parent_peer;
+ public InputPeer[] ids;
+
+ [Flags] public enum Flags : uint
+ {
+ has_parent_peer = 0x2,
+ }
+ }
+
+ [TLDef(0xBA4A3B5B)]
+ public sealed partial class Messages_ReadSavedHistory : IMethod
+ {
+ public InputPeer parent_peer;
+ public InputPeer peer;
+ public int max_id;
+ }
+
[TLDef(0xEDD4882A)]
public sealed partial class Updates_GetState : IMethod { }
@@ -12053,11 +12143,12 @@ namespace TL.Methods
public InputChannelBase channel;
}
- [TLDef(0xA4298B29)]
+ [TLDef(0x3FF75734)]
public sealed partial class Channels_ToggleForum : IMethod
{
public InputChannelBase channel;
public bool enabled;
+ public bool tabs;
}
[TLDef(0xF40C0224)]
@@ -12245,11 +12336,17 @@ namespace TL.Methods
public int limit;
}
- [TLDef(0xFC84653F)]
+ [TLDef(0x4B12327B)]
public sealed partial class Channels_UpdatePaidMessagesPrice : IMethod
{
+ public Flags flags;
public InputChannelBase channel;
public long send_paid_messages_stars;
+
+ [Flags] public enum Flags : uint
+ {
+ broadcast_messages_allowed = 0x1,
+ }
}
[TLDef(0x167FC0A1)]
@@ -12259,6 +12356,13 @@ namespace TL.Methods
public bool enabled;
}
+ [TLDef(0xECE2A0E6)]
+ public sealed partial class Channels_GetMessageAuthor : IMethod
+ {
+ public InputChannelBase channel;
+ public int id;
+ }
+
[TLDef(0xAA2769ED)]
public sealed partial class Bots_SendCustomRequest : IMethod
{
diff --git a/src/TL.Table.cs b/src/TL.Table.cs
index 8e52198..9cba0d9 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 = 203; // fetched 14/05/2025 16:07:47
+ public const int Version = 204; // fetched 04/06/2025 15:07:47
internal const int SecretChats = 144;
internal const int MTProto2 = 73;
internal const uint VectorCtor = 0x1CB5C415;
@@ -136,7 +136,7 @@ namespace TL
[0x29562865] = typeof(ChatEmpty),
[0x41CBF256] = typeof(Chat),
[0x6592A1A7] = typeof(ChatForbidden),
- [0x7482147E] = typeof(Channel),
+ [0xFE685355] = typeof(Channel),
[0x17D493D5] = typeof(ChannelForbidden),
[0x2633421B] = typeof(ChatFull),
[0x52D6806B] = typeof(ChannelFull),
@@ -216,7 +216,7 @@ namespace TL
[0x4717E8A4] = typeof(MessageActionStarGift),
[0x2E3AE60E] = typeof(MessageActionStarGiftUnique),
[0xAC1F1FCD] = typeof(MessageActionPaidMessagesRefunded),
- [0xBCD71419] = typeof(MessageActionPaidMessagesPrice),
+ [0x84B88578] = typeof(MessageActionPaidMessagesPrice),
[0x2FFE2F7A] = typeof(MessageActionConferenceCall),
[0xD58A08C6] = typeof(Dialog),
[0x71BD134C] = typeof(DialogFolder),
@@ -325,7 +325,7 @@ namespace TL
[0xE40370A3] = typeof(UpdateEditMessage),
[0x691E9052] = typeof(UpdateInlineBotCallbackQuery),
[0xB75F99A9] = typeof(UpdateReadChannelOutbox),
- [0x1B49EC6D] = typeof(UpdateDraftMessage),
+ [0xEDFC111E] = typeof(UpdateDraftMessage),
[0x571D2742] = typeof(UpdateReadFeaturedStickers),
[0x9A422C20] = typeof(UpdateRecentStickers),
[0xA229DD06] = typeof(UpdateConfig),
@@ -341,10 +341,10 @@ namespace TL
[0x46560264] = typeof(UpdateLangPackTooLong),
[0x56022F4D] = typeof(UpdateLangPack),
[0xE511996D] = typeof(UpdateFavedStickers),
- [0xEA29055D] = typeof(UpdateChannelReadMessagesContents),
+ [0x25F324F7] = typeof(UpdateChannelReadMessagesContents),
[0x7084A7BE] = typeof(UpdateContactsReset),
[0xB23FC698] = typeof(UpdateChannelAvailableMessages),
- [0xE16459C3] = typeof(UpdateDialogUnreadMark),
+ [0xB658F23E] = typeof(UpdateDialogUnreadMark),
[0xACA1657B] = typeof(UpdateMessagePoll),
[0x54C01850] = typeof(UpdateChatDefaultBannedRights),
[0x19360DC0] = typeof(UpdateFolderPeers),
@@ -378,7 +378,7 @@ namespace TL
[0x4D712F2E] = typeof(UpdateBotCommands),
[0x7063C3DB] = typeof(UpdatePendingJoinRequests),
[0x11DFA986] = typeof(UpdateBotChatInviteRequester),
- [0x5E1B3CB8] = typeof(UpdateMessageReactions),
+ [0x1E297BFA] = typeof(UpdateMessageReactions),
[0x17B7A20B] = typeof(UpdateAttachMenuBots),
[0x1592B79D] = typeof(UpdateWebViewResultSent),
[0x14B85813] = typeof(UpdateBotMenuButton),
@@ -426,6 +426,8 @@ namespace TL
[0x8B725FCE] = typeof(UpdatePaidReactionPrivacy),
[0x504AA18F] = typeof(UpdateSentPhoneCode),
[0xA477288F] = typeof(UpdateGroupCallChainBlocks),
+ [0x77B0E372] = typeof(UpdateReadMonoForumInbox),
+ [0xA4A79376] = typeof(UpdateReadMonoForumOutbox),
[0xA56C2A3E] = typeof(Updates_State),
[0x5D75A138] = typeof(Updates_DifferenceEmpty),
[0x00F49CA0] = typeof(Updates_Difference),
@@ -1211,8 +1213,9 @@ namespace TL
[0xBD74CF49] = typeof(StoryViewPublicRepost),
[0x59D78FC5] = typeof(Stories_StoryViewsList),
[0xDE9EED1D] = typeof(Stories_StoryViews),
- [0x22C0F6D5] = typeof(InputReplyToMessage),
+ [0xB07038B0] = typeof(InputReplyToMessage),
[0x5881323A] = typeof(InputReplyToStory),
+ [0x69D66C45] = typeof(InputReplyToMonoForum),
[0x3FC9053B] = typeof(ExportedStoryLink),
[0x712E27FD] = typeof(StoriesStealthMode),
[0xCFC9E002] = typeof(MediaAreaCoordinates),
@@ -1257,6 +1260,7 @@ namespace TL
[0xCFCD0F13] = typeof(StoryReactionPublicRepost),
[0xAA5F789C] = typeof(Stories_StoryReactionsList),
[0xBD87CB6C] = typeof(SavedDialog),
+ [0x64407EA7] = typeof(MonoForumDialog),
[0xF83AE221] = typeof(Messages_SavedDialogs),
[0x44BA9DD9] = typeof(Messages_SavedDialogsSlice),
[0xC01F6FE8] = typeof(Messages_SavedDialogsNotModified),
diff --git a/src/WTelegramClient.csproj b/src/WTelegramClient.csproj
index 2a71dd9..1c5aa10 100644
--- a/src/WTelegramClient.csproj
+++ b/src/WTelegramClient.csproj
@@ -11,9 +11,10 @@
snupkg
true
WTelegramClient
- 0.0.0
+ 0.0.0
+ layer.204
Wizou
- Telegram Client API (MTProto) library written 100% in C# and .NET Standard | Latest API layer: 203
+ Telegram Client API (MTProto) library written 100% in C# and .NET Standard | Latest API layer: 204
Release Notes:
$(ReleaseNotes.Replace("|", "%0D%0A").Replace(" - ","%0D%0A- ").Replace(" ", "%0D%0A%0D%0A"))