Skip to content

Commit

Permalink
Merge pull request #78 from pascalvgemert/master
Browse files Browse the repository at this point in the history
FCM and GCM not sending the badge number via channel
  • Loading branch information
Edujugon authored Mar 19, 2019
2 parents 2a32e62 + 299674a commit 7fd555c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Channels/GcmChannel.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ protected function buildData(PushMessage $message)
'click_action' => $message->click_action,
],
];

// Set custom badge number when isset in PushMessage
if (! empty($message->badge)) {
$data['notification']['badge'] = $message->badge;
}
}

if (! empty($message->extra)) {
Expand Down

0 comments on commit 7fd555c

Please sign in to comment.