Skip to content

Commit

Permalink
Merge pull request #60 from boryn/return-exceptions-fix
Browse files Browse the repository at this point in the history
fixed missing $notifiable in send() method in Pushover
  • Loading branch information
Kovah authored Mar 11, 2024
2 parents b334882 + f573ac6 commit f0d6d9e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/Pushover.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,12 @@ public function __construct(HttpClient $http, $token)
* @link https://pushover.net/api
*
* @param array $params
* @param mixed $notifiable
* @return \Psr\Http\Message\ResponseInterface
*
* @throws CouldNotSendNotification
*/
public function send($params)
public function send($params, $notifiable)
{
try {
$multipart = [];
Expand Down
5 changes: 4 additions & 1 deletion src/PushoverChannel.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ public function send($notifiable, Notification $notification)
$message = $notification->toPushover($notifiable);

try {
$this->pushover->send(array_merge($message->toArray(), $pushoverReceiver->toArray()));
$this->pushover->send(
array_merge($message->toArray(), $pushoverReceiver->toArray()),
$notifiable
);
} catch (ServiceCommunicationError $serviceCommunicationError) {
$this->fireFailedEvent($notifiable, $notification, $serviceCommunicationError->getMessage());
}
Expand Down

0 comments on commit f0d6d9e

Please sign in to comment.