diff --git a/src/Kernel/Traits/InteractWithHttpClient.php b/src/Kernel/Traits/InteractWithHttpClient.php index 518b77814..44476f21c 100644 --- a/src/Kernel/Traits/InteractWithHttpClient.php +++ b/src/Kernel/Traits/InteractWithHttpClient.php @@ -10,6 +10,7 @@ use Symfony\Component\HttpClient\HttpClient; use Symfony\Component\HttpClient\ScopingHttpClient; use Symfony\Contracts\HttpClient\HttpClientInterface; + use function property_exists; trait InteractWithHttpClient diff --git a/src/Work/Server.php b/src/Work/Server.php index 4d8722a56..30519144f 100644 --- a/src/Work/Server.php +++ b/src/Work/Server.php @@ -148,7 +148,7 @@ public function handleUserDeleted(callable $handler): static public function handlePartyCreated(callable $handler): static { $this->with(function (Message $message, Closure $next) use ($handler): mixed { - return $message->InfoType === 'change_contact' && $message->ChangeType === 'create_party' ? $handler( + return $message->Event === 'change_contact' && $message->ChangeType === 'create_party' ? $handler( $message, $next ) : $next($message); @@ -163,7 +163,7 @@ public function handlePartyCreated(callable $handler): static public function handlePartyUpdated(callable $handler): static { $this->with(function (Message $message, Closure $next) use ($handler): mixed { - return $message->InfoType === 'change_contact' && $message->ChangeType === 'update_party' ? $handler( + return $message->Event === 'change_contact' && $message->ChangeType === 'update_party' ? $handler( $message, $next ) : $next($message); @@ -178,7 +178,7 @@ public function handlePartyUpdated(callable $handler): static public function handlePartyDeleted(callable $handler): static { $this->with(function (Message $message, Closure $next) use ($handler): mixed { - return $message->InfoType === 'change_contact' && $message->ChangeType === 'delete_party' ? $handler( + return $message->Event === 'change_contact' && $message->ChangeType === 'delete_party' ? $handler( $message, $next ) : $next($message);