notification 메소드 정리

This commit is contained in:
Waterticket 2021-12-29 05:48:04 +00:00
parent bef4cd74ae
commit f295f1a49d
2 changed files with 13 additions and 107 deletions

View file

@ -59,37 +59,9 @@ class FCM extends Base implements \Rhymix\Framework\Drivers\PushInterface
);
// Set notification
$notification = [];
$notification = $message->getNotifications() ?? [];
$notification['title'] = $message->getSubject();
$notification['body'] = $message->getContent();
if($message->getClickAction())
{
$notification['click_action'] = $message->getClickAction();
}
if($message->getSound())
{
$notification['sound'] = $message->getSound();
}
if($message->getBadge())
{
$notification['badge'] = $message->getBadge();
}
if($message->getIcon())
{
$notification['icon'] = $message->getIcon();
}
if($message->getTag())
{
$notification['tag'] = $message->getTag();
}
if($message->getColor())
{
$notification['color'] = $message->getColor();
}
if($message->getAndroidChannelId())
{
$notification['android_channel_id'] = $message->getAndroidChannelId();
}
$chunked_token = array_chunk($tokens, 1000);
foreach($chunked_token as $token_unit)