tdlib / td

Cross-platform library for building Telegram clients
https://core.telegram.org/tdlib
Boost Software License 1.0
7.11k stars 1.44k forks source link

GetSupergroupMembers acquisition issue #2588

Closed enpaier closed 11 months ago

enpaier commented 1 year ago

When obtaining members from getSupergroupMembers, the limit is 200, such as a total of 2240, which requires 12 attempts. However, at 6 attempts, only 199 updates can be obtained, without 200 updates. I don't know why?

AYMENJD commented 1 year ago

You can't fetch more than 200 members in channels, unlike supergroups which you can.

enpaier commented 1 year ago

It is the supergroups obtained, and the parameter is written with a limit of 200. For example, the total number is 2240, which requires 12 times. In 6 times, 199 updateusers are obtained, but there are no 200 updateuser queue messages!

enpaier commented 1 year ago

For example, if the total number of members in a group is 8000, using getSupergroupMembers can only obtain around 6000 updateUsers. Why is it different from the total number?

AYMENJD commented 1 year ago

Because there is no direct relationship between getSupergroupMembers and updateUser.

updateUser is sent when a user is not loaded/unknown to the current instance cache. For example, you could call getSupergroupMembers while not receiving any updateUser because the updateUser was sent before for that user and it should be already in your app cache.

enpaier commented 1 year ago

Yes, the user was not loaded. I called getSupergroupMembers to obtain group member information, but now the number of group members obtained is incomplete

enpaier commented 1 year ago

How can I obtain the personal information of all members of a group by calling getSupergroupMembers?

levlam commented 1 year ago

Deleted users can be skipped in response to getSupergroupMembers. There is no way to get them.