diff options
author | RaindropsSys <contact@minteck.org> | 2023-04-02 23:03:02 +0200 |
---|---|---|
committer | RaindropsSys <contact@minteck.org> | 2023-04-02 23:03:02 +0200 |
commit | 02eda3e4c9b4ba718f1fff70b7328ed8cdd5e63b (patch) | |
tree | 6d1dec61008998aadc6b69f7e750712794d99324 /pages/api/emergency-real.php | |
parent | f559308a1b42a9036135d764374a8c007b7d70a9 (diff) | |
download | pluralconnect-02eda3e4c9b4ba718f1fff70b7328ed8cdd5e63b.tar.gz pluralconnect-02eda3e4c9b4ba718f1fff70b7328ed8cdd5e63b.tar.bz2 pluralconnect-02eda3e4c9b4ba718f1fff70b7328ed8cdd5e63b.zip |
Updated 35 files, added 11 files and deleted includes/components/search.inc (automated)
Diffstat (limited to 'pages/api/emergency-real.php')
-rw-r--r-- | pages/api/emergency-real.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pages/api/emergency-real.php b/pages/api/emergency-real.php index d0412c8..a67f549 100644 --- a/pages/api/emergency-real.php +++ b/pages/api/emergency-real.php @@ -9,18 +9,18 @@ if (!$isLoggedIn && !$isLowerLoggedIn) { global $_PROFILE; -$ntfy = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/app.json"), true)["ntfy"]; +$ntfy = $GLOBALS["ColdHazeApp"]["ntfy"]; file_get_contents('https://' . $ntfy["server"] . '/' . $ntfy["topic"], false, stream_context_create([ 'http' => [ 'method' => 'POST', 'header' => "Content-Type: text/plain\r\n" . - "Title: ⚠️🆘 EMERGENCY ⚠️🆘\r\n" . + "Title: " . formatPonypush("⚠️🆘 EMERGENCY ⚠️🆘") . "\r\n" . "Priority: urgent\r\n" . "Tags: emergency\r\n" . "Authorization: Basic " . base64_encode($ntfy["user"] . ":" . $ntfy["password"]), - 'content' => "This is an emergency, " . $_PROFILE['name'] . " is in need of IMMEDIATE help. Please act now!" + 'content' => formatPonypush("This is an emergency, " . $_PROFILE['name'] . " is in need of IMMEDIATE help. Please act now!") ] ])); @@ -29,11 +29,11 @@ file_get_contents('https://' . $ntfy["server"] . '/emergency', false, stream_con 'method' => 'POST', 'header' => "Content-Type: text/plain\r\n" . - "Title: ⚠️🆘 EMERGENCY ⚠️🆘\r\n" . + "Title: " . formatPonypush("⚠️🆘 EMERGENCY ⚠️🆘") . "\r\n" . "Priority: urgent\r\n" . "Tags: emergency\r\n" . "Authorization: Basic " . base64_encode($ntfy["user"] . ":" . $ntfy["password"]), - 'content' => "This is an emergency, " . $_PROFILE['name'] . " is in need of IMMEDIATE help. Please act now!" + 'content' => formatPonypush("This is an emergency, " . $_PROFILE['name'] . " is in need of IMMEDIATE help. Please act now!") ] ])); |