From 6611e8675b8072e8f81e85e1318d22a3c2eb36c7 Mon Sep 17 00:00:00 2001
From: Wizou <11647984+wiz0u@users.noreply.github.com>
Date: Sat, 7 Mar 2026 17:30:15 +0100
Subject: [PATCH] fixed KeyboardButtonUrlAuth
---
src/TL.Schema.cs | 23 ++++++++++++++++++++---
1 file changed, 20 insertions(+), 3 deletions(-)
diff --git a/src/TL.Schema.cs b/src/TL.Schema.cs
index 6f8ea40..fde6d62 100644
--- a/src/TL.Schema.cs
+++ b/src/TL.Schema.cs
@@ -8654,15 +8654,32 @@ namespace TL
{
}
/// Button to request a user to authorize via URL using Seamless Telegram Login. When the user clicks on such a button, Messages_RequestUrlAuth should be called, providing the button_id and the ID of the container message. The returned object will contain more details about the authorization request (request_write_access if the bot would like to send messages to the user along with the username of the bot which will be used for user authorization). Finally, the user can choose to call Messages_AcceptUrlAuth to get a with the URL to open instead of the url of this constructor, or a , in which case the url of this constructor must be opened, instead. If the user refuses the authorization request but still wants to open the link, the url of this constructor must be used. See
- [TLDef(0xF51006F9, inheritAt = 0)]
- public sealed partial class KeyboardButtonUrlAuth : KeyboardButton
+ [TLDef(0xF51006F9)]
+ public sealed partial class KeyboardButtonUrlAuth : KeyboardButtonBase
{
+ /// Extra bits of information, use flags.HasFlag(...) to test for those
+ public Flags flags;
+ [IfFlag(10)] public KeyboardButtonStyle style;
+ /// Button label
+ public string text;
/// New text of the button in forwarded messages.
- public string fwd_text;
+ [IfFlag(0)] public string fwd_text;
/// An HTTP URL to be opened with user authorization data added to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. The data added is the same as described in Receiving authorization data.
NOTE: Services must always check the hash of the received data to verify the authentication and the integrity of the data as described in Checking authorization.
public string url;
/// ID of the button to pass to Messages_RequestUrlAuth
public int button_id;
+
+ [Flags] public enum Flags : uint
+ {
+ /// Field has a value
+ has_fwd_text = 0x1,
+ /// Field has a value
+ has_style = 0x400,
+ }
+
+ public override KeyboardButtonStyle Style => style;
+ /// Button label
+ public override string Text => text;
}
/// Button to request a user to Messages_AcceptUrlAuth via URL using Seamless Telegram Login. See
[TLDef(0x68013E72)]