From c66e722b79ca61e2a5b35acc7c517aee8b1f443c Mon Sep 17 00:00:00 2001 From: Felony Date: Wed, 2 Oct 2019 18:18:42 +0330 Subject: [PATCH 1/3] Add get only Session field to TelegramClient --- TLSharp.Core/TelegramClient.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/TLSharp.Core/TelegramClient.cs b/TLSharp.Core/TelegramClient.cs index d9f0454..ebd17f2 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) { From c4dbc1e3494be7aede45f99666aa0cc08db28c93 Mon Sep 17 00:00:00 2001 From: Mojtaba Tajik Date: Thu, 3 Oct 2019 08:37:09 +0330 Subject: [PATCH 2/3] Revert "Add get only Session field to TelegramClient" This reverts commit c66e722b79ca61e2a5b35acc7c517aee8b1f443c. --- TLSharp.Core/TelegramClient.cs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/TLSharp.Core/TelegramClient.cs b/TLSharp.Core/TelegramClient.cs index ebd17f2..d9f0454 100644 --- a/TLSharp.Core/TelegramClient.cs +++ b/TLSharp.Core/TelegramClient.cs @@ -29,11 +29,6 @@ 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) { From 8716d7f919d58492e3c089f10eb1b13d81ec71d1 Mon Sep 17 00:00:00 2001 From: Mojtaba Tajik Date: Thu, 3 Oct 2019 08:41:27 +0330 Subject: [PATCH 3/3] Add Session readonly field to TelegramClient Add Session readonly field which let user read session properties like current logged-in user's Username & etc. --- 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) {