Fix #1933 add option to send push notification using the "data" field, leaving out the "notification" field

This commit is contained in:
Kijin Sung 2023-08-03 23:00:57 +09:00
parent 00159407f4
commit 918418ebf3
5 changed files with 34 additions and 2 deletions

View file

@ -1588,11 +1588,15 @@ class ncenterliteController extends ncenterlite
}
$oPush = new \Rhymix\Framework\Push();
$oPush->setSubject($content);
$oPush->setContent(strval($args->extra_content));
if (!isset($config->fcm_push_format) || $config->fcm_push_format === 'notification')
{
$oPush->setSubject($content);
$oPush->setContent(strval($args->extra_content));
}
$oPush->setData($args->extra_data);
$oPush->setURL(strval($target_url));
$oPush->addTo(intval($args->member_srl));
var_dump($oPush);exit;
$output = $oPush->send();
return $output;