TLSharp
TLSharp copied to clipboard
Group Participants can only get 10004 ?
When I get all of the group members, I can only get 10004 at most. Why is that?
string gruopName = "PornHub";
var client = NewClient();
await client.ConnectAsync();
var dialogs = (TLDialogs)await client.GetUserDialogsAsync();
var main = dialogs.Chats.ToList().Where(c => c.GetType() == typeof(TLChannel))
.Cast<TLChannel>()
.FirstOrDefault(c => c.Title == (gruopName));
var req = new TLRequestGetFullChannel()
{
Channel = new TLInputChannel() { AccessHash =(long) main.AccessHash, ChannelId = main.Id }
};
var res = await client.SendRequestAsync<TeleSharp.TL.Messages.TLChatFull>(req);
////we have to do this in slices
var result = new ChannelInfo();
var offset = 0;
while (offset < (res.FullChat as TLChannelFull).ParticipantsCount)
{
var pReq = new TLRequestGetParticipants()
{
Channel = new TLInputChannel() { AccessHash = main.AccessHash.Value, ChannelId = main.Id },
Filter = new TLChannelParticipantsRecent() { },
Limit = 200,
Offset = offset
};
var pRes = await client.SendRequestAsync<TLChannelParticipants>(pReq);
result.Users.AddRange(pRes.Users.ToList().Cast<TLUser>());
offset += 200;
await Task.Delay(500);
}
public class ChannelInfo
{
public TLChannel Channel { get; set; }
public TeleSharp.TL.Messages.TLChatFull ChatFull { get; set; }
public List<TLUser> Users { get; set; } = new List<TLUser>();
private DateTime _dateCreated;
public DateTime DateCreated
{
get { return _dateCreated; }
set
{
_dateCreated = new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc).AddSeconds(Channel.Date).ToLocalTime();
}
}
}

https://github.com/sochix/TLSharp/issues/970
Anybody here ?
😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀😀 Anybody here ?
Hello, I have the same problem. Have you solved it
Hello, I have the same problem. Have you solved it
NO.