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:
Paulo Rogerio Panhoto 2017-12-27 17:32:27 -02:00
parent a8a82f39a5
commit a69db6ba27

View file

@ -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)
{