mirror of
https://github.com/wiz0u/WTelegramClient.git
synced 2025-12-06 06:52:01 +01:00
API Layer 171: Saved reactions/tags
This commit is contained in:
parent
7dc578f91d
commit
a0841fee4c
|
|
@ -5060,6 +5060,9 @@ namespace TL
|
|||
has_order = 0x1,
|
||||
}
|
||||
}
|
||||
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/updateSavedReactionTags"/></para></summary>
|
||||
[TLDef(0x39C67432)]
|
||||
public class UpdateSavedReactionTags : Update { }
|
||||
|
||||
/// <summary>Updates state. <para>See <a href="https://corefork.telegram.org/constructor/updates.state"/></para></summary>
|
||||
[TLDef(0xA56C2A3E)]
|
||||
|
|
@ -14328,6 +14331,7 @@ namespace TL
|
|||
has_recent_reactions = 0x2,
|
||||
/// <summary>Whether <see cref="SchemaExtensions.Messages_GetMessageReactionsList">Messages_GetMessageReactionsList</see> can be used to see how each specific peer reacted to the message</summary>
|
||||
can_see_list = 0x4,
|
||||
reactions_as_tags = 0x8,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -16808,4 +16812,28 @@ namespace TL
|
|||
{
|
||||
public int count;
|
||||
}
|
||||
|
||||
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/savedReactionTag"/></para></summary>
|
||||
[TLDef(0xCB6FF828)]
|
||||
public class SavedReactionTag : IObject
|
||||
{
|
||||
public Flags flags;
|
||||
public Reaction reaction;
|
||||
[IfFlag(0)] public string title;
|
||||
public int count;
|
||||
|
||||
[Flags] public enum Flags : uint
|
||||
{
|
||||
has_title = 0x1,
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary><para>See <a href="https://corefork.telegram.org/constructor/messages.savedReactionTags"/></para></summary>
|
||||
/// <remarks>a <see langword="null"/> value means <a href="https://corefork.telegram.org/constructor/messages.savedReactionTagsNotModified">messages.savedReactionTagsNotModified</a></remarks>
|
||||
[TLDef(0x3259950A)]
|
||||
public class Messages_SavedReactionTags : IObject
|
||||
{
|
||||
public SavedReactionTag[] tags;
|
||||
public long hash;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1522,14 +1522,15 @@ namespace TL
|
|||
/// <param name="max_id"><a href="https://corefork.telegram.org/api/offsets">Maximum message ID to return</a></param>
|
||||
/// <param name="min_id"><a href="https://corefork.telegram.org/api/offsets">Minimum message ID to return</a></param>
|
||||
/// <param name="hash"><a href="https://corefork.telegram.org/api/offsets">Hash</a></param>
|
||||
public static Task<Messages_MessagesBase> Messages_Search(this Client client, InputPeer peer, string q, MessagesFilter filter = null, DateTime min_date = default, DateTime max_date = default, int offset_id = default, int add_offset = default, int limit = int.MaxValue, int max_id = default, int min_id = default, long hash = default, InputPeer from_id = null, int? top_msg_id = null, InputPeer saved_peer_id = null)
|
||||
public static Task<Messages_MessagesBase> Messages_Search(this Client client, InputPeer peer, string q, MessagesFilter filter = null, DateTime min_date = default, DateTime max_date = default, int offset_id = default, int add_offset = default, int limit = int.MaxValue, int max_id = default, int min_id = default, long hash = default, InputPeer from_id = null, int? top_msg_id = null, InputPeer saved_peer_id = null, Reaction[] saved_reaction = null)
|
||||
=> client.Invoke(new Messages_Search
|
||||
{
|
||||
flags = (Messages_Search.Flags)((from_id != null ? 0x1 : 0) | (top_msg_id != null ? 0x2 : 0) | (saved_peer_id != null ? 0x4 : 0)),
|
||||
flags = (Messages_Search.Flags)((from_id != null ? 0x1 : 0) | (top_msg_id != null ? 0x2 : 0) | (saved_peer_id != null ? 0x4 : 0) | (saved_reaction != null ? 0x8 : 0)),
|
||||
peer = peer,
|
||||
q = q,
|
||||
from_id = from_id,
|
||||
saved_peer_id = saved_peer_id,
|
||||
saved_reaction = saved_reaction,
|
||||
top_msg_id = top_msg_id.GetValueOrDefault(),
|
||||
filter = filter,
|
||||
min_date = min_date,
|
||||
|
|
@ -3813,6 +3814,31 @@ namespace TL
|
|||
order = order,
|
||||
});
|
||||
|
||||
/// <summary><para>See <a href="https://corefork.telegram.org/method/messages.getSavedReactionTags"/></para></summary>
|
||||
/// <returns>a <c>null</c> value means <a href="https://corefork.telegram.org/constructor/messages.savedReactionTagsNotModified">messages.savedReactionTagsNotModified</a></returns>
|
||||
public static Task<Messages_SavedReactionTags> Messages_GetSavedReactionTags(this Client client, long hash = default)
|
||||
=> client.Invoke(new Messages_GetSavedReactionTags
|
||||
{
|
||||
hash = hash,
|
||||
});
|
||||
|
||||
/// <summary><para>See <a href="https://corefork.telegram.org/method/messages.updateSavedReactionTag"/></para></summary>
|
||||
public static Task<bool> Messages_UpdateSavedReactionTag(this Client client, Reaction reaction, string title = null)
|
||||
=> client.Invoke(new Messages_UpdateSavedReactionTag
|
||||
{
|
||||
flags = (Messages_UpdateSavedReactionTag.Flags)(title != null ? 0x1 : 0),
|
||||
reaction = reaction,
|
||||
title = title,
|
||||
});
|
||||
|
||||
/// <summary><para>See <a href="https://corefork.telegram.org/method/messages.getDefaultTagReactions"/></para></summary>
|
||||
/// <returns>a <c>null</c> value means <a href="https://corefork.telegram.org/constructor/messages.reactionsNotModified">messages.reactionsNotModified</a></returns>
|
||||
public static Task<Messages_Reactions> Messages_GetDefaultTagReactions(this Client client, long hash = default)
|
||||
=> client.Invoke(new Messages_GetDefaultTagReactions
|
||||
{
|
||||
hash = hash,
|
||||
});
|
||||
|
||||
/// <summary>Returns a current state of updates. <para>See <a href="https://corefork.telegram.org/method/updates.getState"/> [bots: ✓]</para></summary>
|
||||
public static Task<Updates_State> Updates_GetState(this Client client)
|
||||
=> client.Invoke(new Updates_GetState
|
||||
|
|
@ -7418,7 +7444,7 @@ namespace TL.Methods
|
|||
public long hash;
|
||||
}
|
||||
|
||||
[TLDef(0xA7B4E929)]
|
||||
[TLDef(0x29EE847A)]
|
||||
public class Messages_Search : IMethod<Messages_MessagesBase>
|
||||
{
|
||||
public Flags flags;
|
||||
|
|
@ -7426,6 +7452,7 @@ namespace TL.Methods
|
|||
public string q;
|
||||
[IfFlag(0)] public InputPeer from_id;
|
||||
[IfFlag(2)] public InputPeer saved_peer_id;
|
||||
[IfFlag(3)] public Reaction[] saved_reaction;
|
||||
[IfFlag(1)] public int top_msg_id;
|
||||
public MessagesFilter filter;
|
||||
public DateTime min_date;
|
||||
|
|
@ -7442,6 +7469,7 @@ namespace TL.Methods
|
|||
has_from_id = 0x1,
|
||||
has_top_msg_id = 0x2,
|
||||
has_saved_peer_id = 0x4,
|
||||
has_saved_reaction = 0x8,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -9402,6 +9430,31 @@ namespace TL.Methods
|
|||
}
|
||||
}
|
||||
|
||||
[TLDef(0x761DDACF)]
|
||||
public class Messages_GetSavedReactionTags : IMethod<Messages_SavedReactionTags>
|
||||
{
|
||||
public long hash;
|
||||
}
|
||||
|
||||
[TLDef(0x60297DEC)]
|
||||
public class Messages_UpdateSavedReactionTag : IMethod<bool>
|
||||
{
|
||||
public Flags flags;
|
||||
public Reaction reaction;
|
||||
[IfFlag(0)] public string title;
|
||||
|
||||
[Flags] public enum Flags : uint
|
||||
{
|
||||
has_title = 0x1,
|
||||
}
|
||||
}
|
||||
|
||||
[TLDef(0xBDF93428)]
|
||||
public class Messages_GetDefaultTagReactions : IMethod<Messages_Reactions>
|
||||
{
|
||||
public long hash;
|
||||
}
|
||||
|
||||
[TLDef(0xEDD4882A)]
|
||||
public class Updates_GetState : IMethod<Updates_State> { }
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ namespace TL
|
|||
{
|
||||
public static class Layer
|
||||
{
|
||||
public const int Version = 170; // fetched 31/12/2023 17:22:50
|
||||
public const int Version = 171; // fetched 16/01/2024 17:09:52
|
||||
internal const int SecretChats = 144;
|
||||
internal const int MTProto2 = 73;
|
||||
internal const uint VectorCtor = 0x1CB5C415;
|
||||
|
|
@ -392,6 +392,7 @@ namespace TL
|
|||
[0x09CB7759] = typeof(UpdateBotMessageReactions),
|
||||
[0xAEAF9E74] = typeof(UpdateSavedDialogPinned),
|
||||
[0x686C85A6] = typeof(UpdatePinnedSavedDialogs),
|
||||
[0x39C67432] = typeof(UpdateSavedReactionTags),
|
||||
[0xA56C2A3E] = typeof(Updates_State),
|
||||
[0x5D75A138] = typeof(Updates_DifferenceEmpty),
|
||||
[0x00F49CA0] = typeof(Updates_Difference),
|
||||
|
|
@ -1184,6 +1185,9 @@ namespace TL
|
|||
[0xF83AE221] = typeof(Messages_SavedDialogs),
|
||||
[0x44BA9DD9] = typeof(Messages_SavedDialogsSlice),
|
||||
[0xC01F6FE8] = typeof(Messages_SavedDialogsNotModified),
|
||||
[0xCB6FF828] = typeof(SavedReactionTag),
|
||||
[0x889B59EF] = null,//Messages_SavedReactionTagsNotModified
|
||||
[0x3259950A] = typeof(Messages_SavedReactionTags),
|
||||
// from TL.Secret:
|
||||
[0x6ABD9782] = typeof(Layer143.DecryptedMessageMediaDocument),
|
||||
[0x91CC4674] = typeof(Layer73.DecryptedMessage),
|
||||
|
|
@ -1307,6 +1311,7 @@ namespace TL
|
|||
[typeof(Help_AppConfig)] = 0x7CDE641D, //help.appConfigNotModified
|
||||
[typeof(BotApp)] = 0x5DA674B7, //botAppNotModified
|
||||
[typeof(Help_PeerColors)] = 0x2BA1F5CE, //help.peerColorsNotModified
|
||||
[typeof(Messages_SavedReactionTags)] = 0x889B59EF, //messages.savedReactionTagsNotModified
|
||||
[typeof(DecryptedMessageMedia)] = 0x089F5C4A, //decryptedMessageMediaEmpty
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
<PackageId>WTelegramClient</PackageId>
|
||||
<Version>0.0.0</Version>
|
||||
<Authors>Wizou</Authors>
|
||||
<Description>Telegram Client API (MTProto) library written 100% in C# and .NET Standard | Latest API layer: 170 Release Notes: $(ReleaseNotes.Replace("|", "%0D%0A").Replace(" - ","%0D%0A- ").Replace(" ", "%0D%0A%0D%0A"))</Description>
|
||||
<Description>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"))</Description>
|
||||
<Copyright>Copyright © Olivier Marcoux 2021-2023</Copyright>
|
||||
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||
<PackageProjectUrl>https://github.com/wiz0u/WTelegramClient</PackageProjectUrl>
|
||||
|
|
|
|||
Loading…
Reference in a new issue