ServerKeyToConfig

This commit is contained in:
JonatanRek 2019-10-09 10:59:47 +02:00
parent 9d098217fb
commit 4eef8753c1

View File

@ -106,7 +106,6 @@ class AutomationManager{
//finalization //finalization
if ($run) { if ($run) {
$serverKey = 'AAAAFcN4elo:APA91bG4GViYbiwDHhNgkcOc3DpCYHW_4dpj9F-nQ-v5yiRcps9iENT6CmVAi8Qxxyjid5mrsMAqib9YSyObBOEJLg-Q9gsD5MnVaJjjTYggwyeyJEgFLM5wQNPeqQDPvIecXS9sbib4';
$body = ''; $body = '';
$sceneDoArray = json_decode($sceneDoJson); $sceneDoArray = json_decode($sceneDoJson);
@ -118,10 +117,10 @@ class AutomationManager{
$i = 0; $i = 0;
foreach ($subscribers as $key => $subscriber) { foreach ($subscribers as $key => $subscriber) {
$logManager->write("[NOTIFICATION] SENDING NOTIFICATION TO" . $subscriber['id'] . " was executed" . $i); $logManager->write("[NOTIFICATION] SENDING NOTIFICATION TO" . $subscriber['id'] . " was executed" . $i);
$title = 'Automatizace-'.$automation['automation_id']." was executed" . $i; $title = 'Automatization '.$automation['name']." was just executed";
$notification = new Notification($serverKey); $notification = new Notification(SERVERKEY);
$notification->to($subscriber['token']); $notification->to($subscriber['token']);
$notification->notification($subscriber['id'], '' , '', ''); $notification->notification($title, '' , '', '');
$notification->send(); $notification->send();
$notification = null; $notification = null;
} }