1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-12-02 12:37:47 +01:00
This commit is contained in:
Daniil Gentili 2023-11-23 21:34:35 +01:00
parent f0680e42f8
commit 45394fc238

View File

@ -125,7 +125,7 @@ final class StoriesEventHandler extends SimpleEventHandler
$stories = $this->userInstance->stories->getPeerStories(peer: $message->commandArgs[0])['stories']['stories']; $stories = $this->userInstance->stories->getPeerStories(peer: $message->commandArgs[0])['stories']['stories'];
$last = null; $last = null;
do { do {
$res = $this->userInstance->stories->getPinnedStories(peer: $message->commandArgs[0], offset_id: $last)['stories']['stories']; $res = $this->userInstance->stories->getPinnedStories(peer: $message->commandArgs[0], offset_id: $last)['stories'];
$last = $res ? end($res)['id'] : null; $last = $res ? end($res)['id'] : null;
$stories = array_merge($res, $stories); $stories = array_merge($res, $stories);
} while ($last); } while ($last);