mirror of
https://github.com/sochix/TLSharp.git
synced 2025-12-06 08:02:00 +01:00
.
This commit is contained in:
parent
0b6c67b5aa
commit
f0c2f43aef
|
|
@ -93,13 +93,14 @@ namespace TLSharp.Core
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
TLExportedAuthorization exported = null;
|
||||
if (_session.TLUser != null)
|
||||
{
|
||||
TLRequestExportAuthorization exportAuthorization = new TLRequestExportAuthorization() { DcId = dcId };
|
||||
exported = await SendRequestAsync<TLExportedAuthorization>(exportAuthorization, times);
|
||||
}
|
||||
|
||||
|
||||
|
||||
_transport = new TcpTransport(dc.IpAddress, dc.Port, _handler);
|
||||
_session.ServerAddress = dc.IpAddress;
|
||||
|
|
@ -107,13 +108,14 @@ namespace TLSharp.Core
|
|||
|
||||
await ConnectAsync(true);
|
||||
|
||||
|
||||
if (_session.TLUser != null)
|
||||
{
|
||||
TLRequestImportAuthorization importAuthorization = new TLRequestImportAuthorization() { Id = exported.Id, Bytes = exported.Bytes };
|
||||
var imported = await SendRequestAsync<TLAuthorization>(importAuthorization,times);
|
||||
OnUserAuthenticated(((TLUser)imported.User));
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -148,6 +150,10 @@ namespace TLSharp.Core
|
|||
{
|
||||
throw e;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine(e.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue