Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/unacms/una
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonLV committed Oct 4, 2024
2 parents 1cbbd45 + 3f685df commit daa1db1
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions inc/classes/BxDolPush.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,17 @@ public function send($iProfileId, $aMessage, $bAddToQueue = false)
'data' => [
'url' => $sUrlWeb
],
'chrome_web_icon' => !empty($aMessage['icon']) ? $aMessage['icon'] : '',
];


if (empty($aMessage['icon'])){
$aMessage['icon'] = BxTemplFunctions::getInstance()->getMainLogoUrl();
}
if (!empty($aMessage['icon'])){
$aFields['chrome_web_icon'] = $aMessage['icon'];
$aFields['large_icon'] = $aMessage['icon'];
$aFields['ios_attachments'] = ['id'=> $aMessage['icon']];
}

if ('on' == getParam('bx_nexus_option_push_notifications_count')) {
$iBadgeCount = $this->getNotificationsCount($iProfileId);
$aFields['ios_badgeType'] = 'SetTo';
Expand Down

0 comments on commit daa1db1

Please sign in to comment.