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

Operator priority
Some checks failed
ci/woodpecker/tag/build Pipeline failed
ci/woodpecker/tag/deploy unknown status

This commit is contained in:
Daniil Gentili 2022-06-06 21:47:00 +02:00
parent e3e5209da1
commit 58bf0191a7
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7

View File

@ -119,7 +119,7 @@ $MadelineProto->loop(function () use ($MadelineProto) {
/*
* Try making a phone call
*/
if (!\getenv('GITHUB_SHA') && \stripos(yield $MadelineProto->readline('Do you want to make a call? (y/n): ') ?? '', 'y') !== false) {
if (!\getenv('GITHUB_SHA') && \stripos((yield $MadelineProto->readline('Do you want to make a call? (y/n): ')) ?? '', 'y') !== false) {
$controller = yield $MadelineProto->requestCall(\getenv('TEST_SECRET_CHAT'))->play('input.raw')->then('input.raw')->playOnHold(['input.raw'])->setOutputFile('output.raw');
while ($controller->getCallState() < \danog\MadelineProto\VoIP::CALL_STATE_READY) {
yield $MadelineProto->sleep(1);
@ -133,7 +133,7 @@ $MadelineProto->loop(function () use ($MadelineProto) {
/*
* Try receiving a phone call
*/
if (!\getenv('GITHUB_SHA') && \stripos(yield $MadelineProto->readline('Do you want to handle incoming calls? (y/n): ') ?? '', 'y') !== false) {
if (!\getenv('GITHUB_SHA') && \stripos((yield $MadelineProto->readline('Do you want to handle incoming calls? (y/n): ')) ?? '', 'y') !== false) {
$howmany = yield $MadelineProto->readline('How many calls would you like me to handle? ');
$offset = 0;
while ($howmany > 0) {
@ -155,7 +155,7 @@ $MadelineProto->loop(function () use ($MadelineProto) {
/*
* Secret chat usage
*/
if (!\getenv('GITHUB_SHA') && \stripos(yield $MadelineProto->readline('Do you want to make the secret chat tests? (y/n): ') ?? '', 'y') !== false) {
if (!\getenv('GITHUB_SHA') && \stripos((yield $MadelineProto->readline('Do you want to make the secret chat tests? (y/n): ')) ?? '', 'y') !== false) {
if (!\getenv('TEST_SECRET_CHAT')) {
throw new Exception('No TEST_SECRET_CHAT environment variable was provided!');
}