Skip to content

Commit cbbcab6

Browse files
author
Aboozar Ghaffari
authored
Merge pull request #13 from daviidbolhasani/Discord
fix discord adapter
2 parents 447e0c5 + 9b02a4a commit cbbcab6

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/Adapter/Discord.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,11 @@ public function send(string $number, string $message)
1515
{
1616
$number = $this->filterNumber($number);
1717

18-
$data = json_encode(['content' => "To: $number - Message: $message"]);
18+
$data = ['content' => "To: $number - Message: $message"];
1919

2020
$ch = curl_init($this->url);
21-
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
2221
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
2322
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
24-
curl_setopt($ch, CURLOPT_HEADER, array('Content-Type: application/json'));
2523
$data = curl_exec($ch);
2624

2725
if(curl_errno($ch)){

0 commit comments

Comments
 (0)