sochix / TLSharp

Telegram client library implemented in C#
1.01k stars 380 forks source link

I can't fetch the full list of groups, this code returns only few groups. #943

Open SMPSLLC opened 4 years ago

SMPSLLC commented 4 years ago

My code :

public async Task<TLAbsDialogs> GetUserDialogsAsync()
        {
            var peer = new TLInputPeerChat();
            return await client.SendRequestAsync<TLAbsDialogs>(
                new TLRequestGetDialogs() { OffsetPeer = peer, Limit = int.MaxValue });
        }

var dialogs = await GetUserDialogsAsync() as TLDialogsSlice;
var chats = dialogs.Chats
                    .OfType<TLChat>()
                    .ToList();
Console.WriteLine("Count : " + chats.Count());

output (when Limit = int.MaxValue): Count : 14 output (when Limit = int.MinValue): Count : 7