From 2047154d2651e5cc730e475b3aabdff8aad12e27 Mon Sep 17 00:00:00 2001
From: Wizou <11647984+wiz0u@users.noreply.github.com>
Date: Tue, 15 Nov 2022 16:20:00 +0100
Subject: [PATCH] doc
---
.github/dev.yml | 2 +-
README.md | 4 ++--
src/Client.Helpers.cs | 5 +++--
src/Client.cs | 2 +-
4 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/.github/dev.yml b/.github/dev.yml
index 4352170..d26fff4 100644
--- a/.github/dev.yml
+++ b/.github/dev.yml
@@ -2,7 +2,7 @@ pr: none
trigger:
- master
-name: 3.1.2-dev.$(Rev:r)
+name: 3.1.3-dev.$(Rev:r)
pool:
vmImage: ubuntu-latest
diff --git a/README.md b/README.md
index 436378c..b4369aa 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,8 @@
-[](https://www.nuget.org/packages/WTelegramClient/)
+[](https://www.nuget.org/packages/WTelegramClient/)
[](https://dev.azure.com/wiz0u/WTelegramClient/_build?definitionId=7)
[](https://corefork.telegram.org/methods)
[](https://dev.azure.com/wiz0u/WTelegramClient/_artifacts/feed/WTelegramClient/NuGet/WTelegramClient)
-[](https://t.me/WTelegramClient)
+[](https://t.me/WTelegramClient)
[](http://t.me/WTelegramBot?start=donate)
## _Telegram Client API library written 100% in C# and .NET Standard_
diff --git a/src/Client.Helpers.cs b/src/Client.Helpers.cs
index b809f94..3ef85f2 100644
--- a/src/Client.Helpers.cs
+++ b/src/Client.Helpers.cs
@@ -16,7 +16,7 @@ namespace WTelegram
partial class Client
{
#region Collect Access Hash system
- /// Enable the collection of id/access_hash pairs (experimental)
+ /// Enable the collection of id/access_hash pairs (experimental)
See
public bool CollectAccessHash { get; set; }
public IEnumerable> AllAccessHashesFor() where T : IObject => _accessHashes.GetValueOrDefault(typeof(T));
private readonly Dictionary> _accessHashes = new();
@@ -25,10 +25,11 @@ namespace WTelegram
/// Retrieve the access_hash associated with this id (for a TL class) if it was collected
/// This requires to be set to first.
- ///
See Examples/Program_CollectAccessHash.cs for how to use this
+ /// See Examples/Program_CollectAccessHash.cs for how to use this
/// a TL object class. For example User, Channel or Photo
public long GetAccessHashFor(long id) where T : IObject
{
+ if (!CollectAccessHash) Helpers.Log(4, "GetAccessHashFor doesn't do what you think. See https://github.com/wiz0u/WTelegramClient/blob/master/FAQ.md#access-hash");
lock (_accessHashes)
return _accessHashes.GetOrCreate(typeof(T)).TryGetValue(id, out var access_hash) ? access_hash : 0;
}
diff --git a/src/Client.cs b/src/Client.cs
index e9506ae..891764a 100644
--- a/src/Client.cs
+++ b/src/Client.cs
@@ -49,7 +49,7 @@ namespace WTelegram
public bool Disconnected => _tcpClient != null && !(_tcpClient.Client?.Connected ?? false);
/// ID of the current logged-in user or 0
public long UserId => _session.UserId;
- /// Info about the current logged-in user
+ /// Info about the current logged-in user. This is filled after a successful (re)login
public User User { get; private set; }
private Func _config;