diff --git a/TLSharp.Core/TelegramClient.cs b/TLSharp.Core/TelegramClient.cs index e5b0819f..8834ce65 100644 --- a/TLSharp.Core/TelegramClient.cs +++ b/TLSharp.Core/TelegramClient.cs @@ -456,6 +456,22 @@ await sender.SendPingAsync(token) .ConfigureAwait(false); } + /// + /// Resolve user or chat. API: contacts.resolveUsername#f93ccba3 username:string = contacts.ResolvedPeer; + /// + /// User or chat name + /// + public async Task resolveUserName(string username) + { + var r = new TeleSharp.TL.Contacts.TLRequestResolveUsername + { + Username = username + }; + + return await SendRequestAsync(r) + .ConfigureAwait(false); + } + private void OnUserAuthenticated(TLUser TLUser) { session.TLUser = TLUser;