From bdc3ff6d8b9015e484e8f624f1fe814d54673fb1 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Sat, 6 Jul 2019 19:27:13 +0200 Subject: [PATCH] bugfixes --- src/danog/MadelineProto/Loop/Connection/ReadLoop.php | 2 -- src/danog/MadelineProto/Tools.php | 3 --- tests/testing.php | 9 +++++++++ 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/danog/MadelineProto/Loop/Connection/ReadLoop.php b/src/danog/MadelineProto/Loop/Connection/ReadLoop.php index a1e3cb36..a958e97d 100644 --- a/src/danog/MadelineProto/Loop/Connection/ReadLoop.php +++ b/src/danog/MadelineProto/Loop/Connection/ReadLoop.php @@ -27,8 +27,6 @@ use danog\MadelineProto\Loop\Impl\SignalLoop; use danog\MadelineProto\MTProtoTools\Crypt; use danog\MadelineProto\NothingInTheSocketException; use danog\MadelineProto\Tools; -use Amp\ByteStream\StreamException; -use Amp\ByteStream\PendingReadError; /** * Socket read loop. diff --git a/src/danog/MadelineProto/Tools.php b/src/danog/MadelineProto/Tools.php index 42ca113b..242db9fc 100644 --- a/src/danog/MadelineProto/Tools.php +++ b/src/danog/MadelineProto/Tools.php @@ -23,7 +23,6 @@ use Amp\Failure; use Amp\Loop; use Amp\Promise; use Amp\Success; -use function Amp\ByteStream\getOutputBufferStream; use function Amp\ByteStream\getStdin; use function Amp\ByteStream\getStdout; use function Amp\Promise\all; @@ -32,8 +31,6 @@ use function Amp\Promise\first; use function Amp\Promise\some; use function Amp\Promise\timeout; use function Amp\Promise\wait; -use function Amp\ByteStream\getStdin; -use function Amp\ByteStream\getStdout; use function Amp\ByteStream\getOutputBufferStream; use function Amp\File\exists; use function Amp\File\touch; diff --git a/tests/testing.php b/tests/testing.php index dce3c12b..44df8964 100755 --- a/tests/testing.php +++ b/tests/testing.php @@ -58,6 +58,15 @@ try { $MadelineProto->accept_tos(); } } + + $inputMediaUploadedPhoto1 = ['_' => 'inputMediaUploadedPhoto','file' => '1.jpg']; + $inputMediaUploadedPhoto2 = ['_' => 'inputMediaUploadedPhoto','file' => '2.jpg']; + $inputMediaUploadedPhoto3 = ['_' => 'inputMediaUploadedPhoto','file' => '3.jpg']; + $inputSingleMedia1 = ['_' => 'inputSingleMedia', 'media' => $inputMediaUploadedPhoto1, 'message' => 'str']; + $inputSingleMedia2 = ['_' => 'inputSingleMedia', 'media' => $inputMediaUploadedPhoto2, 'message' => 'str']; + $inputSingleMedia3 = ['_' => 'inputSingleMedia', 'media' => $inputMediaUploadedPhoto3, 'message' => 'str']; + $Updates = $this->messages->sendMultiMedia(['peer' => 'danogentili','multi_media' => [$inputSingleMedia3, $inputSingleMedia2,$inputSingleMedia1]]); + //var_dump(count($MadelineProto->get_pwr_chat('@madelineproto')['participants'])); /*