precision on tg://user?id=

This commit is contained in:
Wizou 2021-10-31 02:56:51 +01:00
parent e615f83db6
commit 8d8465fa64
5 changed files with 5 additions and 4 deletions

View file

@ -420,7 +420,7 @@ namespace TL
var url = sb.ToString(urlStart, urlLength);
sb.Remove(urlStart, urlLength + 1);
offset = urlStart;
if (url.StartsWith("tg://user?id=") && long.TryParse(url[13..], out var user_id) && client.GetAccessHashFor<User>(user_id) is long hash && hash != 0)
if (url.StartsWith("tg://user?id=") && long.TryParse(url[13..], out var user_id) && client.GetAccessHashFor<User>(user_id) is long hash)
entities[lastIndex] = new InputMessageEntityMentionName { offset = entity.offset, length = entity.length, user_id = new InputUser { user_id = user_id, access_hash = hash } };
else
((MessageEntityTextUrl)entity).url = url;

View file

@ -34,7 +34,7 @@
</ItemGroup>
<ItemGroup>
<None Include="..\.github\ci.yml" Link="Data\ci.yml" />
<None Include="..\.github\dev.yml" Link="Data\dev.yml" />
<None Include="..\logo.png" Link="Data\logo.png" Pack="true" PackagePath="\" />
<None Include="..\README.md" Link="Data\README.md" Pack="true" PackagePath="\" />
<None Include="..\.github\release.yml" Link="Data\release.yml" />