Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
Saifallak committed Aug 1, 2024
2 parents 4d9b999 + 5a05536 commit 46727c1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Cloudwa.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function __construct()
{
$this->headers = [
'Content-Type' => 'application/json',
'Authorization' => 'Bearer ' . config('cloudwa.api_token'),
'Authorization' => 'Bearer '.config('cloudwa.api_token'),
'Accept' => 'application/json',
];

Expand Down Expand Up @@ -109,7 +109,7 @@ public function sendMessage(): void
{
collect($this->phones)
->filter()
->map(fn($p) => $this->normalizeNumber($p))
->map(fn ($p) => $this->normalizeNumber($p))
->each(function ($phone) {

rescue(function () use ($phone) {
Expand Down Expand Up @@ -142,7 +142,7 @@ public function sendOTP(): array|Collection

return collect($this->phones)
->filter()
->map(fn($p) => $this->normalizeNumber($p))
->map(fn ($p) => $this->normalizeNumber($p))
->map(function ($phone) use ($team) {

rescue(function () use ($team, $phone) {
Expand Down Expand Up @@ -183,7 +183,7 @@ public static function generateWaCallback(string $reference, string $code): arra

return [
'reference' => $reference,
'message' => 'OTP:' . $team . ':' . $code,
'message' => 'OTP:'.$team.':'.$code,
'phone' => $phone,
'scheme' => "whatsapp://send?text=OTP:$team:$code&phone=$phone&abid=$phone",
'url' => "https://wa.me/$phone?text=OTP:$team:$code",
Expand Down

0 comments on commit 46727c1

Please sign in to comment.