Closed xcgu closed 1 year ago
I checked this with another mtproto client to check if its server side problem but it was ok so it seems to be madelineproto issue
The offset_date should be 0.
No affect still the same problem Also this is the way I get $lastId: $lastId = end($chatInviteImporters['users'])['id'];
Try end($chatInviteImporters['importers'])['user_id']
No change again. I will provide a complete test with full code.
This is my test
Here is the full importers: https://gist.github.com/thebrutish/574473005f341266b11f2254bd239278
Then I tried this code:
$i = 1;
do {
$chatInviteImporters = $MadelineProto->messages->getChatInviteImporters(
peer: $peer,
offset_user: $lastId ?? null,
link: $link,
offset_date: 0,
limit: 2
);
echo 'Last ID is: ' . ($lastId ?? 'First round');
echo json_encode($chatInviteImporters); echo '
';
$lastId = end($chatInviteImporters['importers'])['user_id'];
$i++;
} while ($i < 5);
And the result is: https://gist.github.com/thebrutish/6b9f10ce631613f9dbcdeb852875319a
I also tried manually passing offset_user with different user ids but it seems to be ignored totally
[ ]
Damn, this was a nasty one, it turns out offset_date
must also be provided for offset_user
to work, will document this.
Hi
$MadelineProto->messages->getChatInviteImporters( peer: $peer, offset_user: $lastId ?? null, link: $link, offset_date: -1, limit: int );
This mthod is not working as it must. I tried different offset_user with the same limit (I tested 5 and my link has at least 100 importers) but the results are the same.