From bb782c2ab03cd38744a6a1a3379fd1886c9129fd Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Wed, 26 Jun 2024 18:28:15 +0200 Subject: [PATCH] One more cancellation --- docs | 2 +- src/InternalDoc.php | 4 ++-- src/VoIPController.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs b/docs index 0385b677f..2da03b4f6 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 0385b677fe87246a0ae35b362929b96dd3ffcccd +Subproject commit 2da03b4f6e1d3136996f066c536df72eda2e293c diff --git a/src/InternalDoc.php b/src/InternalDoc.php index a525bc8b8..1c921d509 100644 --- a/src/InternalDoc.php +++ b/src/InternalDoc.php @@ -617,9 +617,9 @@ abstract class InternalDoc * * @param string $url URL */ - final public function fileGetContents(string $url): string + final public function fileGetContents(string $url, ?\Amp\Cancellation $cancellation = null): string { - return $this->wrapper->getAPI()->fileGetContents($url); + return $this->wrapper->getAPI()->fileGetContents($url, $cancellation ?? $this->wrapper->getRpcDropCancellation()); } /** * Asynchronously lock a file diff --git a/src/VoIPController.php b/src/VoIPController.php index 6ad16d7de..8ddf23671 100644 --- a/src/VoIPController.php +++ b/src/VoIPController.php @@ -310,7 +310,7 @@ final class VoIPController return $this; } catch (CallAlreadyDeclinedError) { $this->log(Lang::$current_lang['call_already_declined']); - $this->discard(DiscardReason::HANGUP, cancellation: $cancellation); + $this->discard(DiscardReason::HANGUP); return $this; } $this->call['b'] = $b;