fix required type for PhoneCallDiscardReason (#756)
* fix type for PhoneCallDiscardReason * change PhoneCallDiscardReason parameters type to array
This commit is contained in:
parent
db40848866
commit
91590ff360
@ -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');
|
||||
|
Loading…
Reference in New Issue
Block a user