From 4ad2f0a212f35a0954738b39c5826b506323b603 Mon Sep 17 00:00:00 2001 From: Wizou <11647984+wiz0u@users.noreply.github.com> Date: Thu, 13 Nov 2025 07:45:57 +0100 Subject: [PATCH] Fix incorrect bare type for DestroyAuthKey, RpcDropAnswer, DestroySession --- src/TL.MTProto.cs | 22 ++++++++++------------ src/TL.Table.cs | 5 ++++- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/TL.MTProto.cs b/src/TL.MTProto.cs index 86d6e90..4b6e052 100644 --- a/src/TL.MTProto.cs +++ b/src/TL.MTProto.cs @@ -109,15 +109,13 @@ namespace TL public Int128 new_nonce_hash3; } - public enum DestroyAuthKeyRes : uint - { - ///See - Ok = 0xF660E1D4, - ///See - None = 0x0A9F2259, - ///See - Fail = 0xEA109B13, - } + public abstract partial class DestroyAuthKeyRes : IObject { } + [TLDef(0xF660E1D4)] //destroy_auth_key_ok#f660e1d4 = DestroyAuthKeyRes + public sealed partial class DestroyAuthKeyOk : DestroyAuthKeyRes { } + [TLDef(0x0A9F2259)] //destroy_auth_key_none#0a9f2259 = DestroyAuthKeyRes + public sealed partial class DestroyAuthKeyNone : DestroyAuthKeyRes { } + [TLDef(0xEA109B13)] //destroy_auth_key_fail#ea109b13 = DestroyAuthKeyRes + public sealed partial class DestroyAuthKeyFail : DestroyAuthKeyRes { } [TLDef(0x62D6B459)] //msgs_ack#62d6b459 msg_ids:Vector = MsgsAck public sealed partial class MsgsAck : IObject @@ -327,12 +325,12 @@ namespace TL }); public static Task DestroyAuthKey(this Client client) - => client.InvokeBare(new DestroyAuthKey + => client.Invoke(new DestroyAuthKey { }); public static Task RpcDropAnswer(this Client client, long req_msg_id) - => client.InvokeBare(new Methods.RpcDropAnswer + => client.Invoke(new Methods.RpcDropAnswer { req_msg_id = req_msg_id, }); @@ -357,7 +355,7 @@ namespace TL }); public static Task DestroySession(this Client client, long session_id) - => client.InvokeBare(new DestroySession + => client.Invoke(new DestroySession { session_id = session_id, }); diff --git a/src/TL.Table.cs b/src/TL.Table.cs index dec7eeb..de3f2d5 100644 --- a/src/TL.Table.cs +++ b/src/TL.Table.cs @@ -41,7 +41,9 @@ namespace TL [0x3BCBF734] = typeof(DhGenOk), [0x46DC1FB9] = typeof(DhGenRetry), [0xA69DAE02] = typeof(DhGenFail), - [0x7ABE77EC] = typeof(Methods.Ping), + [0xF660E1D4] = typeof(DestroyAuthKeyOk), + [0x0A9F2259] = typeof(DestroyAuthKeyNone), + [0xEA109B13] = typeof(DestroyAuthKeyFail), [0x62D6B459] = typeof(MsgsAck), [0xA7EFF811] = typeof(BadMsgNotification), [0xEDAB447B] = typeof(BadServerSalt), @@ -66,6 +68,7 @@ namespace TL [0x37982646] = typeof(IpPortSecret), [0x4679B65F] = typeof(AccessPointRule), [0x5A592A6C] = typeof(Help_ConfigSimple), + [0x7ABE77EC] = typeof(Methods.Ping), // from TL.SchemaExtensions: [0x3FEDD339] = typeof(True), [0xC4B9F9BB] = typeof(Error),