mirror of
https://github.com/sochix/TLSharp.git
synced 2025-12-06 08:02:00 +01:00
TelegramClient exposes Session as a property so that TLUser can be retrieved by application in case the sign in process is bypassed.
Example code:
if (client.IsUserAuthorized())
user = client.Session.TLUser;
else
{
/* sign in or sign up */
}
This commit is contained in:
parent
a8a82f39a5
commit
a69db6ba27
|
|
@ -30,6 +30,8 @@ namespace TLSharp.Core
|
|||
private List<TLDcOption> dcOptions;
|
||||
private TcpClientConnectionHandler _handler;
|
||||
|
||||
public Session Session { get { return _session; } }
|
||||
|
||||
public TelegramClient(int apiId, string apiHash,
|
||||
Session session = null, string sessionUserId = "session", TcpClientConnectionHandler handler = null)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue