mirror of
https://github.com/danog/MadelineProto.git
synced 2024-11-26 21:34:41 +01:00
Fix
This commit is contained in:
parent
b3eb9e9243
commit
9ec2f619b7
2
docs
2
docs
@ -1 +1 @@
|
||||
Subproject commit b1968e08ee33430f535100e7dd9c1e1f8bc9a2bb
|
||||
Subproject commit 1e38683e7f0464c86cb5084c360dc1753b28d130
|
@ -136,16 +136,18 @@ final class StoriesEventHandler extends SimpleEventHandler
|
||||
// Sort by date
|
||||
usort($stories, static fn ($a, $b) => $a['date'] <=> $b['date']);
|
||||
|
||||
$result = "Total stories: ".count($stories)."\n\n";
|
||||
foreach ($stories as $story) {
|
||||
$cur = "- ID {$story['id']}, posted ".date(DATE_RFC850, $story['date']);
|
||||
if (isset($story['caption'])) {
|
||||
$cur .= ', "'.self::markdownEscape($story['caption']).'"';
|
||||
$message = $message->reply("Total stories: ".count($stories));
|
||||
foreach (array_chunk($stories, 50) as $sub) {
|
||||
$result = '';
|
||||
foreach ($sub as $story) {
|
||||
$cur = "- ID {$story['id']}, posted ".date(DATE_RFC850, $story['date']);
|
||||
if (isset($story['caption'])) {
|
||||
$cur .= ', "'.self::markdownEscape($story['caption']).'"';
|
||||
}
|
||||
$result .= "$cur; [click here to download »]({$this->userInstance->getDownloadLink($story)})\n";
|
||||
}
|
||||
$result .= "$cur; [click here to download »]({$this->userInstance->getDownloadLink($story)})\n";
|
||||
$message = $message->reply($result, parseMode: ParseMode::MARKDOWN);
|
||||
}
|
||||
|
||||
$message->reply($result, parseMode: ParseMode::MARKDOWN);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user