gramjs
gramjs copied to clipboard
client.getParticipants duplicates participants
const list = await this.client.getParticipants(dialogId, { limit: 256 })
console.log(members.total, members.length, members.map(m => m.id))
// members.total=3
// members.length=256
// members.map(m => m.id) = TotalList(256) [11,12,13,11,12,13,...]
Running [email protected]
Looks like including offset: 0
fixes it. Introduced by https://github.com/gram-js/gramjs/pull/386
I don't think the offset
necessarily fixes the issue entirely.
I have a telegram group containing ~7k members - showed in the telegram app as well as in the total_count
in the response, but get around 500 non-unique ids when iterating over the participants in batches (limit = 100) using the offset.