Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

via toPushed you can decided if a user is notified by it's settings o… #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 3 additions & 1 deletion src/PushedChannel.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}
}