1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-26 23:14:38 +01:00

CI stuff
Some checks are pending
ci/woodpecker/push/build Pipeline is pending
ci/woodpecker/tag/build Pipeline was successful
ci/woodpecker/tag/deploy Pipeline was successful

This commit is contained in:
Daniil Gentili 2022-07-26 19:48:32 +02:00
parent ee14d6cf27
commit f2636016df
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7

View File

@ -257,8 +257,8 @@ $MadelineProto->loop(function () use ($MadelineProto) {
if (!\getenv('TEST_USERNAME')) {
throw new Exception('No TEST_USERNAME environment variable was provided!');
}
yield $MadelineProto->refreshPeerCache(\getenv('TEST_USERNAME'));
yield $MadelineProto->refreshFullPeerCache(\getenv('TEST_USERNAME'));
/*yield $MadelineProto->refreshPeerCache(\getenv('TEST_USERNAME'));
yield $MadelineProto->refreshFullPeerCache(\getenv('TEST_USERNAME'));*/
$mention = yield $MadelineProto->getInfo(\getenv('TEST_USERNAME')); // Returns an array with all of the constructors that can be extracted from a username or an id
$mention = $mention['user_id']; // Selects only the numeric user id
$media = [];
@ -295,11 +295,11 @@ $MadelineProto->loop(function () use ($MadelineProto) {
foreach ($media as $type => $inputMedia) {
if ($type !== 'sticker' && $type !== 'voice') {
$MadelineProto->logger("Sending multi $type");
/*$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']);