diff --git a/src/danog/MadelineProto/InternalDoc.php b/src/danog/MadelineProto/InternalDoc.php index 1c65b76e..bdc01d7e 100644 --- a/src/danog/MadelineProto/InternalDoc.php +++ b/src/danog/MadelineProto/InternalDoc.php @@ -5543,34 +5543,6 @@ class InternalDoc extends APIFactory { \danog\MadelineProto\MTProto::setVar($obj, $var, $val); } - /** - * Accept call from VoIP instance. - * - * @param \danog\MadelineProto\VoIP $instance Call instance - * @param array $user User - * - * @return mixed - */ - public function acceptCallFrom($instance, $user, array $extra = []) - { - return $this->__call(__FUNCTION__, [$instance, $user, $extra]); - } - /** - * Undocumented function. - * - * @param \danog\MadelineProto\VoIP $instance Call instance - * @param array $call Call info - * @param array $reason Discard reason - * @param array $rating Rating - * @param boolean $need_debug Needs debug? - * - * @return mixed - */ - public function discardCallFrom($instance, $call, $reason, $rating = [ - ], $need_debug = true, array $extra = []) - { - return $this->__call(__FUNCTION__, [$instance, $call, $reason, $rating, $need_debug, $extra]); - } /** * Request VoIP call. * diff --git a/src/danog/MadelineProto/MTProtoTools/AuthKeyHandler.php b/src/danog/MadelineProto/MTProtoTools/AuthKeyHandler.php index 9ace817b..cd0fd64a 100644 --- a/src/danog/MadelineProto/MTProtoTools/AuthKeyHandler.php +++ b/src/danog/MadelineProto/MTProtoTools/AuthKeyHandler.php @@ -110,7 +110,7 @@ trait AuthKeyHandler */ $pq = new \tgseclib\Math\BigInteger((string) $pq_bytes, 256); $q = new \tgseclib\Math\BigInteger(0); - $p = new \tgseclib\Math\BigInteger(\danog\PrimeModule::auto_single($pq->__toString())); + $p = new \tgseclib\Math\BigInteger(@\danog\PrimeModule::auto_single($pq->__toString())); if (!$p->equals(\danog\MadelineProto\Magic::$zero)) { $q = $pq->divide($p)[0]; if ($p->compare($q) > 0) { @@ -119,7 +119,7 @@ trait AuthKeyHandler } if (!$pq->equals($p->multiply($q))) { $this->logger->logger('Automatic factorization failed, trying native CPP module', \danog\MadelineProto\Logger::ERROR); - $p = new \tgseclib\Math\BigInteger(\danog\PrimeModule::native_single_cpp($pq->__toString())); + $p = new \tgseclib\Math\BigInteger(@\danog\PrimeModule::native_single_cpp($pq->__toString())); if (!$p->equals(\danog\MadelineProto\Magic::$zero)) { $q = $pq->divide($p)[0]; if ($p->compare($q) > 0) { @@ -128,7 +128,7 @@ trait AuthKeyHandler } if (!$pq->equals($p->multiply($q))) { $this->logger->logger('Automatic factorization failed, trying alt py module', \danog\MadelineProto\Logger::ERROR); - $p = new \tgseclib\Math\BigInteger(\danog\PrimeModule::python_single_alt($pq->__toString())); + $p = new \tgseclib\Math\BigInteger(@\danog\PrimeModule::python_single_alt($pq->__toString())); if (!$p->equals(\danog\MadelineProto\Magic::$zero)) { $q = $pq->divide($p)[0]; if ($p->compare($q) > 0) { @@ -137,7 +137,7 @@ trait AuthKeyHandler } if (!$pq->equals($p->multiply($q))) { $this->logger->logger('Automatic factorization failed, trying py module', \danog\MadelineProto\Logger::ERROR); - $p = new \tgseclib\Math\BigInteger(\danog\PrimeModule::python_single($pq->__toString())); + $p = new \tgseclib\Math\BigInteger(@\danog\PrimeModule::python_single($pq->__toString())); if (!$p->equals(\danog\MadelineProto\Magic::$zero)) { $q = $pq->divide($p)[0]; if ($p->compare($q) > 0) { @@ -146,7 +146,7 @@ trait AuthKeyHandler } if (!$pq->equals($p->multiply($q))) { $this->logger->logger('Automatic factorization failed, trying native module', \danog\MadelineProto\Logger::ERROR); - $p = new \tgseclib\Math\BigInteger(\danog\PrimeModule::native_single($pq->__toString())); + $p = new \tgseclib\Math\BigInteger(@\danog\PrimeModule::native_single($pq->__toString())); if (!$p->equals(\danog\MadelineProto\Magic::$zero)) { $q = $pq->divide($p)[0]; if ($p->compare($q) > 0) { diff --git a/src/danog/MadelineProto/MTProtoTools/UpdateHandler.php b/src/danog/MadelineProto/MTProtoTools/UpdateHandler.php index 0619d0f2..7fcc2c0f 100644 --- a/src/danog/MadelineProto/MTProtoTools/UpdateHandler.php +++ b/src/danog/MadelineProto/MTProtoTools/UpdateHandler.php @@ -372,7 +372,7 @@ trait UpdateHandler if (!isset($this->calls[$update['phone_call']['id']])) { return; } - return $this->calls[$update['phone_call']['id']]->discard($update['phone_call']['reason'], [], $update['phone_call']['need_debug']); + return $this->calls[$update['phone_call']['id']]->discard($update['phone_call']['reason'] ?? [], [], $update['phone_call']['need_debug'] ?? false); } } if ($update['_'] === 'updateNewEncryptedMessage' && !isset($update['message']['decrypted_message'])) { diff --git a/src/danog/MadelineProto/VoIP/AuthKeyHandler.php b/src/danog/MadelineProto/VoIP/AuthKeyHandler.php index e3ae907b..c0bde324 100644 --- a/src/danog/MadelineProto/VoIP/AuthKeyHandler.php +++ b/src/danog/MadelineProto/VoIP/AuthKeyHandler.php @@ -36,6 +36,8 @@ trait AuthKeyHandler * @param \danog\MadelineProto\VoIP $instance Call instance * @param array $user User * + * @internal + * * @return mixed */ public function acceptCallFrom($instance, $user) @@ -61,6 +63,8 @@ trait AuthKeyHandler * @param array $rating Rating * @param boolean $need_debug Needs debug? * + * @internal + * * @return mixed */ public function discardCallFrom($instance, $call, $reason, $rating = [], $need_debug = true)