From 8a15feea7c9357aab5bf6df504d45ae2077009d4 Mon Sep 17 00:00:00 2001 From: Felony Date: Wed, 2 Oct 2019 18:18:42 +0330 Subject: [PATCH] Add Session getter-only property to TelegramClient Add Session readonly field which lets the developer read session properties like current logged-in user's Username et-al. https://github.com/sochix/TLSharp/pull/875 --- TLSharp.Core/TelegramClient.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/TLSharp.Core/TelegramClient.cs b/TLSharp.Core/TelegramClient.cs index d9f0454..f7e0258 100644 --- a/TLSharp.Core/TelegramClient.cs +++ b/TLSharp.Core/TelegramClient.cs @@ -29,6 +29,11 @@ namespace TLSharp.Core private List dcOptions; private TcpClientConnectionHandler _handler; + public Session Session + { + get { return _session; } + } + public TelegramClient(int apiId, string apiHash, ISessionStore store = null, string sessionUserId = "session", TcpClientConnectionHandler handler = null) {