mirror of
https://github.com/wiz0u/WTelegramClient.git
synced 2025-12-06 06:52:01 +01:00
webdoc "only simple chat" for 4 more methods
This commit is contained in:
parent
f6e14c7499
commit
44ee933b03
|
|
@ -396,7 +396,7 @@ WTelegram.Helpers.Log = (lvl, str) => _logger.Log((LogLevel)lvl, str);
|
|||
<a name="2FA"></a>
|
||||
### Change 2FA password
|
||||
```csharp
|
||||
const string old_password = "password"; // current password if any
|
||||
const string old_password = "password"; // current password if any (unused otherwise)
|
||||
const string new_password = "new_password"; // or null to disable 2FA
|
||||
var accountPassword = await client.Account_GetPassword();
|
||||
var password = accountPassword.current_algo == null ? null : await WTelegram.Client.InputCheckPassword(accountPassword, old_password);
|
||||
|
|
@ -408,7 +408,7 @@ await client.Account_UpdatePasswordSettings(password, new Account_PasswordInputS
|
|||
new_password_hash = new_password_hash?.A,
|
||||
new_algo = accountPassword.new_algo,
|
||||
hint = "new hint",
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
<a name="reaction"></a>
|
||||
|
|
|
|||
|
|
@ -302,11 +302,13 @@ namespace TL
|
|||
{
|
||||
nonce = nonce,
|
||||
});
|
||||
|
||||
public static Task<ResPQ> ReqPqMulti(this Client client, Int128 nonce)
|
||||
=> client.InvokeBare(new ReqPqMulti
|
||||
{
|
||||
nonce = nonce,
|
||||
});
|
||||
|
||||
public static Task<ServerDHParams> ReqDHParams(this Client client, Int128 nonce, Int128 server_nonce, byte[] p, byte[] q, long public_key_fingerprint, byte[] encrypted_data)
|
||||
=> client.InvokeBare(new ReqDHParams
|
||||
{
|
||||
|
|
@ -317,6 +319,7 @@ namespace TL
|
|||
public_key_fingerprint = public_key_fingerprint,
|
||||
encrypted_data = encrypted_data,
|
||||
});
|
||||
|
||||
public static Task<SetClientDHParamsAnswer> SetClientDHParams(this Client client, Int128 nonce, Int128 server_nonce, byte[] encrypted_data)
|
||||
=> client.InvokeBare(new SetClientDHParams
|
||||
{
|
||||
|
|
@ -324,31 +327,37 @@ namespace TL
|
|||
server_nonce = server_nonce,
|
||||
encrypted_data = encrypted_data,
|
||||
});
|
||||
|
||||
public static Task<DestroyAuthKeyRes> DestroyAuthKey(this Client client)
|
||||
=> client.InvokeBare(new DestroyAuthKey
|
||||
{
|
||||
});
|
||||
|
||||
public static Task<RpcDropAnswer> RpcDropAnswer(this Client client, long req_msg_id)
|
||||
=> client.InvokeBare(new Methods.RpcDropAnswer
|
||||
{
|
||||
req_msg_id = req_msg_id,
|
||||
});
|
||||
|
||||
public static Task<FutureSalts> GetFutureSalts(this Client client, int num)
|
||||
=> client.Invoke(new GetFutureSalts
|
||||
{
|
||||
num = num,
|
||||
});
|
||||
|
||||
public static Task<Pong> Ping(this Client client, long ping_id)
|
||||
=> client.Invoke(new Ping
|
||||
{
|
||||
ping_id = ping_id,
|
||||
});
|
||||
|
||||
public static Task<Pong> PingDelayDisconnect(this Client client, long ping_id, int disconnect_delay)
|
||||
=> client.Invoke(new PingDelayDisconnect
|
||||
{
|
||||
ping_id = ping_id,
|
||||
disconnect_delay = disconnect_delay,
|
||||
});
|
||||
|
||||
public static Task<DestroySessionRes> DestroySession(this Client client, long session_id)
|
||||
=> client.InvokeBare(new DestroySession
|
||||
{
|
||||
|
|
|
|||
419
src/TL.Schema.cs
419
src/TL.Schema.cs
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue