我无法获取组的完整列表,响应仅返回新组
我的代码:
var dialogs = (TLDialogsSlice)await client.GetUserDialogsAsync();
var chats = dialogs.Chats
.Where(c => c.GetType() == typeof(TLChat))
.Cast<TLChat>();
Console.WriteLine("Count : " + chats.Count());
我用这个方法:
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());
当Limit = int.MaxValue或0时输出 15 组,当Limit = int.MinValue时输出 7 组
但问题是我在电报上加入了超过 15 个群组,为什么我无法获取所有群组?