Skip to content
This repository was archived by the owner on Feb 18, 2023. It is now read-only.

Commit aba4c63

Browse files
committed
Return Content-Type header with interactions
1 parent fb974c8 commit aba4c63

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Discord/Client.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ public function handleRequest(ServerRequestInterface $request)
274274
return $this->handleInteraction($interaction)->then(function ($result) {
275275
$this->logger->info('responding to interaction', $result);
276276

277-
return new Response(200, [], json_encode($result));
277+
return new Response(200, ['Content-Type' => 'application/json'], json_encode($result));
278278
});
279279
}
280280

@@ -334,7 +334,7 @@ private function handleApplicationCommand(Interaction $interaction): void
334334
*/
335335
public function handleGatewayInteractionResponse(array $response, Interaction $interaction)
336336
{
337-
$this->discord->getHttp()->post("interactions/{$interaction->id}/{$interaction->token}/callback", $response)->done();
337+
$this->discord->getHttpClient()->post("interactions/{$interaction->id}/{$interaction->token}/callback", $response)->done();
338338
}
339339

340340
/**

0 commit comments

Comments
 (0)