1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-30 06:59:01 +01:00

Update dependencies
Some checks failed
ci/woodpecker/push/build Pipeline failed
ci/woodpecker/tag/build Pipeline failed
ci/woodpecker/tag/deploy unknown status

This commit is contained in:
Daniil Gentili 2022-07-26 18:51:59 +02:00
parent e654e40d08
commit a6375a0522
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7
2 changed files with 8 additions and 9 deletions

2
docs

@ -1 +1 @@
Subproject commit c0eadd60779d2c0851fdbba9e476d72666d835c8
Subproject commit aebaf507999a250e7f84a594281e15c24ab8e57f

View File

@ -294,6 +294,13 @@ $MadelineProto->loop(function () use ($MadelineProto) {
$MadelineProto->logger($sentMessage, \danog\MadelineProto\Logger::NOTICE);
foreach ($media as $type => $inputMedia) {
if ($type !== 'sticker' && $type !== 'voice') {
$MadelineProto->logger("Sending multi $type");
yield $MadelineProto->messages->sendMultiMedia(['peer' => $peer, 'multi_media' => [
['_' => 'inputSingleMedia', 'media' => $inputMedia, 'message' => '['.$message.'](mention:'.$mention.')', 'parse_mode' => 'markdown'],
['_' => 'inputSingleMedia', 'media' => $inputMedia, 'message' => '['.$message.'](mention:'.$mention.')', 'parse_mode' => 'markdown'],
]]);
}
$MadelineProto->logger("Sending $type");
yield $MadelineProto->messages->sendMedia(['peer' => $peer, 'media' => $inputMedia, 'message' => '['.$message.'](mention:'.$mention.')', 'parse_mode' => 'markdown']);
$MadelineProto->logger("Uploading $type");
@ -303,14 +310,6 @@ $MadelineProto->loop(function () use ($MadelineProto) {
$MadelineProto->logger("Re-sending $type");
$inputMedia['file'] = $media;
yield $MadelineProto->messages->uploadMedia(['peer' => '@me', 'media' => $inputMedia]);
if ($type === 'sticker' || $type === 'voice') {
continue;
}
$MadelineProto->logger("Sending multi $type");
yield $MadelineProto->messages->sendMultiMedia(['peer' => $peer, 'multi_media' => [
['_' => 'inputSingleMedia', 'media' => $inputMedia, 'message' => '['.$message.'](mention:'.$mention.')', 'parse_mode' => 'markdown'],
['_' => 'inputSingleMedia', 'media' => $inputMedia, 'message' => '['.$message.'](mention:'.$mention.')', 'parse_mode' => 'markdown'],
]]);
}
}