mirror of
https://github.com/sochix/TLSharp.git
synced 2026-01-24 01:20:39 +01:00
Add methods for working with contacts. (#896)
Added methods for working with contacts: * Import contact list * Delete contact list * Delete one contact
This commit is contained in:
parent
e6672f4a98
commit
84b0f5fe1b
|
|
@ -234,26 +234,6 @@ namespace TLSharp.Core
|
|||
return (T)result;
|
||||
}
|
||||
|
||||
public async Task<TLUser> UpdateUsernameAsync(string username)
|
||||
{
|
||||
if (!IsUserAuthorized())
|
||||
throw new InvalidOperationException("Authorize user first!");
|
||||
|
||||
var req = new TLRequestUpdateUsername { Username = username };
|
||||
|
||||
return await SendRequestAsync<TLUser>(req);
|
||||
}
|
||||
|
||||
public async Task<bool> CheckUsernameAsync(string username)
|
||||
{
|
||||
if (!IsUserAuthorized())
|
||||
throw new InvalidOperationException("Authorize user first!");
|
||||
|
||||
var req = new TLRequestCheckUsername { Username = username };
|
||||
|
||||
return await SendRequestAsync<bool>(req);
|
||||
}
|
||||
|
||||
public async Task<TLImportedContacts> ImportContactsAsync(IReadOnlyList<TLInputPhoneContact> contacts)
|
||||
{
|
||||
if (!IsUserAuthorized())
|
||||
|
|
|
|||
Loading…
Reference in a new issue