Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Dec 1, 2020
1 parent 1dd93f3 commit f124a4d
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/Channels/NexmoSmsChannel.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,18 @@ public function send($notifiable, Notification $notification)
$message = new NexmoMessage($message);
}

return ($message->client ?? $this->nexmo)->message()->send([
$payload = [
'type' => $message->type,
'from' => $message->from ?: $this->from,
'to' => $to,
'text' => trim($message->content),
'client_ref' => $message->clientReference,
'callback' => $message->statusCallback,
]);
];

if ($message->statusCallback) {
$payload['client_ref'] = $message->clientReference;
}

return ($message->client ?? $this->nexmo)->message()->send($payload);
}
}

0 comments on commit f124a4d

Please sign in to comment.