diff --git a/README.md b/README.md index ababb59..2c09713 100755 --- a/README.md +++ b/README.md @@ -84,8 +84,8 @@ public function toPushed($notifiable) - `setUrl($url)`: (string) adds a URL action to the notification - `toApp()`: sends the notification to all users registered to your app - `toChannel($alias)`: (string) sends the notification to a given channel alias -- `toUser($accessToken)`: (string) sends the notification to a user that registered to your app using OAuth -- `toPushedId($pushedId)`: (string) sends the notification directly to a user's Pushed ID +- `toUser($accessToken, $alias)`: (string) sends the notification to a user that registered to your app using OAuth +- `toPushedId($pushedId, $alias)`: (string) sends the notification directly to a user's Pushed ID ## Testing diff --git a/src/PushedChannel.php b/src/PushedChannel.php index cb73288..3e0c402 100644 --- a/src/PushedChannel.php +++ b/src/PushedChannel.php @@ -17,6 +17,8 @@ public function send($notifiable, Notification $notification) { $message = $notification->toPushed($notifiable); - $this->pushed->send($message->payload()); + if ($message) { + $this->pushed->send($message->payload()); + } } }