From de0f34e8c5eb2156c1d4394816ee7ff9f3d6b24f Mon Sep 17 00:00:00 2001
From: Wizou <11647984+wiz0u@users.noreply.github.com>
Date: Tue, 26 Apr 2022 21:13:23 +0200
Subject: [PATCH] handle TAKEOUT_INIT_DELAY_X
---
FAQ.md | 2 +-
src/Client.cs | 2 +-
src/TL.Schema.cs | 10 +++++-----
src/TL.SchemaFuncs.cs | 12 ++++++------
4 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/FAQ.md b/FAQ.md
index 4f6acf3..86ffba5 100644
--- a/FAQ.md
+++ b/FAQ.md
@@ -202,7 +202,7 @@ A session file is created or resumed automatically on startup, and maintained up
That session file is incompatible with TLSharp so you cannot reuse a TLSharp .dat file. You'll need to create a new session.
**DON'T** call methods Auth_SendCode/SignIn/SignUp/... because all the login phase is handled automatically by calling `await client.LoginUserIfNeeded()` after creating the client.
-Your Config callback just need to provide the various login answers if they are needed (see [ReadMe](README.md)).
+Your Config callback just need to provide the various login answers if they are needed (see [ReadMe](README.md) and [FAQ #4](#GUI)).
In particular, it will detect and handle automatically the various login cases/particularity like:
* Login not necessary (when a session is resumed with an already logged-in user)
* 2FA password required (your Config needs to provide "password")
diff --git a/src/Client.cs b/src/Client.cs
index bdd35aa..0aa1cda 100644
--- a/src/Client.cs
+++ b/src/Client.cs
@@ -1149,7 +1149,7 @@ namespace WTelegram
goto retry;
}
}
- else if (code == 420 && message.EndsWith("_WAIT_X"))
+ else if (code == 420 && (message.EndsWith("_WAIT_X") || message.EndsWith("_DELAY_X")))
{
if (x <= FloodRetryThreshold)
{
diff --git a/src/TL.Schema.cs b/src/TL.Schema.cs
index 1d02cfa..9a0490d 100644
--- a/src/TL.Schema.cs
+++ b/src/TL.Schema.cs
@@ -1029,7 +1029,7 @@ namespace TL
public override string Title => title;
}
- /// Full info about a channel, supergroup, gigagroup or legacy group. Derived classes: , See
+ /// Full info about a channel, supergroup, gigagroup or basic group. Derived classes: , See
public abstract partial class ChatFullBase : IObject
{
/// ID of the chat
@@ -1063,7 +1063,7 @@ namespace TL
/// Allowed message reactions »
public abstract string[] AvailableReactions { get; }
}
- /// Full info about a legacy group. See
+ /// Full info about a basic group. See
[TLDef(0xD18EE226)]
public partial class ChatFull : ChatFullBase
{
@@ -2921,7 +2921,7 @@ namespace TL
public int count;
}
- /// Full info about a channel, supergroup, gigagroup or legacy group. See
+ /// Full info about a channel, supergroup, gigagroup or basic group. See
[TLDef(0xE5D7D19C)]
public class Messages_ChatFull : IObject, IPeerResolver
{
@@ -3011,7 +3011,7 @@ namespace TL
/// Object contains info on events occurred. Derived classes: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , See
public abstract class Update : IObject { }
- /// New message in a private chat or in a legacy group. See
+ /// New message in a private chat or in a basic group. See
[TLDef(0x1F2B0AFD)]
public class UpdateNewMessage : Update
{
@@ -3345,7 +3345,7 @@ namespace TL
/// New view counter
public int views;
}
- /// Admin permissions of a user in a legacy group were changed See
+ /// Admin permissions of a user in a basic group were changed See
[TLDef(0xD7CA61A2, inheritBefore = true)]
public class UpdateChatParticipantAdmin : UpdateChat
{
diff --git a/src/TL.SchemaFuncs.cs b/src/TL.SchemaFuncs.cs
index 8435e9e..d33a1dc 100644
--- a/src/TL.SchemaFuncs.cs
+++ b/src/TL.SchemaFuncs.cs
@@ -656,7 +656,7 @@ namespace TL
/// Initialize account takeout session See Possible codes: 420 (details)
/// Whether to export contacts
/// Whether to export messages in private chats
- /// Whether to export messages in legacy groups
+ /// Whether to export messages in basic groups
/// Whether to export messages in supergroups
/// Whether to export messages in channels
/// Whether to export files
@@ -1484,8 +1484,8 @@ namespace TL
id = id,
});
- /// ⚠ This method is only for small private Chat. See Terminology to understand what this means
Search for a similar method name starting with Channels_ if you're dealing with a Get full info about a legacy group. See [bots: ✓] Possible codes: 400 (details)
- /// Legacy group ID.
+ /// ⚠ This method is only for small private Chat. See Terminology to understand what this means
Search for a similar method name starting with Channels_ if you're dealing with a Get full info about a basic group. See [bots: ✓] Possible codes: 400 (details)
+ /// Basic group ID.
public static Task Messages_GetFullChat(this Client client, long chat_id)
=> client.Invoke(new Messages_GetFullChat
{
@@ -1796,7 +1796,7 @@ namespace TL
increment = increment,
});
- /// ⚠ This method is only for small private Chat. See Terminology to understand what this means
Search for a similar method name starting with Channels_ if you're dealing with a Make a user admin in a legacy group. See Possible codes: 400 (details)
+ /// ⚠ This method is only for small private Chat. See Terminology to understand what this means
Search for a similar method name starting with Channels_ if you're dealing with a Make a user admin in a basic group. See Possible codes: 400 (details)
/// The ID of the group
/// The user to make admin
/// Whether to make them admin
@@ -1808,8 +1808,8 @@ namespace TL
is_admin = is_admin,
});
- /// ⚠ This method is only for small private Chat. See Terminology to understand what this means
Search for a similar method name starting with Channels_ if you're dealing with a Turn a legacy group into a supergroup See Possible codes: 400,403 (details)
- /// Legacy group to migrate
+ /// ⚠ This method is only for small private Chat. See Terminology to understand what this means
Search for a similar method name starting with Channels_ if you're dealing with a Turn a basic group into a supergroup See Possible codes: 400,403 (details)
+ /// Basic group to migrate
public static Task Messages_MigrateChat(this Client client, long chat_id)
=> client.Invoke(new Messages_MigrateChat
{