mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-01 00:02:21 +09:00
notification 메소드 정리
This commit is contained in:
parent
bef4cd74ae
commit
f295f1a49d
2 changed files with 13 additions and 107 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue