From 91590ff360d07e7d56bae0376c2a1e904305ad38 Mon Sep 17 00:00:00 2001 From: Gabriele Date: Wed, 22 Jan 2020 13:31:03 +0100 Subject: [PATCH] fix required type for PhoneCallDiscardReason (#756) * fix type for PhoneCallDiscardReason * change PhoneCallDiscardReason parameters type to array --- src/danog/MadelineProto/VoIP/AuthKeyHandler.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/danog/MadelineProto/VoIP/AuthKeyHandler.php b/src/danog/MadelineProto/VoIP/AuthKeyHandler.php index 04cca6b3..727768d5 100644 --- a/src/danog/MadelineProto/VoIP/AuthKeyHandler.php +++ b/src/danog/MadelineProto/VoIP/AuthKeyHandler.php @@ -67,7 +67,7 @@ trait AuthKeyHandler * * @return array */ - public function discardCall(array $call, string $reason, array $rating = [], bool $need_debug = true): void + public function discardCall(array $call, array $reason, array $rating = [], bool $need_debug = true): void { \danog\MadelineProto\Tools::wait($this->discardCallAsync($call, $reason, $rating, $need_debug)); } @@ -140,7 +140,7 @@ trait AuthKeyHandler } if ($e->rpc === 'CALL_ALREADY_DECLINED') { $this->logger->logger(\danog\MadelineProto\Lang::$current_lang['call_already_declined']); - yield $this->discardCallAsync($call['id'], 'phoneCallDiscardReasonHangup'); + yield $this->discardCallAsync($call['id'], ['_' => 'phoneCallDiscardReasonHangup']); return false; } @@ -185,7 +185,7 @@ trait AuthKeyHandler } if ($e->rpc === 'CALL_ALREADY_DECLINED') { $this->logger->logger(\danog\MadelineProto\Lang::$current_lang['call_already_declined']); - yield $this->discardCallAsync($call['id'], 'phoneCallDiscardReasonHangup'); + yield $this->discardCallAsync($call['id'], ['_' => 'phoneCallDiscardReasonHangup']); return false; } @@ -296,7 +296,7 @@ trait AuthKeyHandler * * @return \Generator */ - public function discardCallAsync(array $call, string $reason, array $rating = [], bool $need_debug = true): \Generator + public function discardCallAsync(array $call, array $reason, array $rating = [], bool $need_debug = true): \Generator { if (!\class_exists('\\danog\\MadelineProto\\VoIP')) { throw \danog\MadelineProto\Exception::extension('libtgvoip');