Skip to content

Commit f0d6d9e

Browse files
authored
Merge pull request #60 from boryn/return-exceptions-fix
fixed missing $notifiable in send() method in Pushover
2 parents b334882 + f573ac6 commit f0d6d9e

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/Pushover.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,12 @@ public function __construct(HttpClient $http, $token)
5555
* @link https://pushover.net/api
5656
*
5757
* @param array $params
58+
* @param mixed $notifiable
5859
* @return \Psr\Http\Message\ResponseInterface
5960
*
6061
* @throws CouldNotSendNotification
6162
*/
62-
public function send($params)
63+
public function send($params, $notifiable)
6364
{
6465
try {
6566
$multipart = [];

src/PushoverChannel.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,10 @@ public function send($notifiable, Notification $notification)
4747
$message = $notification->toPushover($notifiable);
4848

4949
try {
50-
$this->pushover->send(array_merge($message->toArray(), $pushoverReceiver->toArray()));
50+
$this->pushover->send(
51+
array_merge($message->toArray(), $pushoverReceiver->toArray()),
52+
$notifiable
53+
);
5154
} catch (ServiceCommunicationError $serviceCommunicationError) {
5255
$this->fireFailedEvent($notifiable, $notification, $serviceCommunicationError->getMessage());
5356
}

0 commit comments

Comments
 (0)