mirror of
https://github.com/sochix/TLSharp.git
synced 2026-04-05 14:37:04 +00:00
get apiHash and apiId in the constructor
This commit is contained in:
parent
504b63a6d7
commit
4a44709150
2 changed files with 18 additions and 12 deletions
|
|
@ -18,13 +18,15 @@ namespace TLSharp.Core
|
|||
private MtProtoSender _sender;
|
||||
private AuthKey _key;
|
||||
private TcpTransport _transport;
|
||||
private string _apiHash = "a2514f96431a228e4b9ee473f6c51945";
|
||||
private int _apiId = 19474;
|
||||
private string _apiHash = "";
|
||||
private int _apiId = 0;
|
||||
private Session _session;
|
||||
private List<DcOption> dcOptions;
|
||||
|
||||
public TelegramClient(ISessionStore store, string sessionUserId)
|
||||
public TelegramClient(ISessionStore store, string sessionUserId, string apiHash, int apiId)
|
||||
{
|
||||
_apiHash = apiHash;
|
||||
_apiId = apiId;
|
||||
if (_apiId == 0)
|
||||
throw new InvalidOperationException("Your API_ID is invalid. Do a configuration first https://github.com/sochix/TLSharp#quick-configuration");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue