summaryrefslogtreecommitdiff
path: root/includes/jobs
diff options
context:
space:
mode:
authorRaindropsSys <raindrops@equestria.dev>2024-03-29 22:05:35 +0100
committerRaindropsSys <raindrops@equestria.dev>2024-03-29 22:05:35 +0100
commit5860551daa0f60103ad24e93da29f401a653f144 (patch)
tree9ad97e04152a6edc11d5096c87880978df39086a /includes/jobs
parenta51979ad60074db84af78a06d30fcb888ccb0b03 (diff)
downloadpluralconnect-5860551daa0f60103ad24e93da29f401a653f144.tar.gz
pluralconnect-5860551daa0f60103ad24e93da29f401a653f144.tar.bz2
pluralconnect-5860551daa0f60103ad24e93da29f401a653f144.zip
Updated 20 files, added 6 files, deleted 144 files and renamed .idea/ponycule.iml (automated)
Diffstat (limited to 'includes/jobs')
-rw-r--r--includes/jobs/FrontersNotification.php24
1 files changed, 1 insertions, 23 deletions
diff --git a/includes/jobs/FrontersNotification.php b/includes/jobs/FrontersNotification.php
index 888b640..b4b8ae2 100644
--- a/includes/jobs/FrontersNotification.php
+++ b/includes/jobs/FrontersNotification.php
@@ -34,28 +34,6 @@ file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/$system/last.json"
$ntfy = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/app.json"), true)["ntfy"];
-if (count($fronters["members"]) > 0 && ($system !== $app["other"]["id"] || !isset($app["other"]))) {
- foreach ($fronters["members"] as $member) {
- if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/" . $member["id"] . ".json")) {
- $metadata = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/" . $member["id"] . ".json"), true);
-
- if (!isset($metadata["birth"])) {
- echo("Showing age warning\n");
- showWarning($member["display_name"] ?? $member["name"], $member["name"], $system);
- } else if (isset($metadata['birth']["age"]) && $metadata["birth"]["age"] === 0 && (!isset($metadata['birth']["year"]) || $metadata["birth"]["year"] < 1900)) {
- echo("Showing age warning\n");
- showWarning($member["display_name"] ?? $member["name"], $member["name"], $system);
- } else if (isset($metadata['birth']["year"]) && $metadata["birth"]["year"] < 1900) {
- echo("Showing age warning\n");
- showWarning($member["display_name"] ?? $member["name"], $member["name"], $system);
- } else if (!isset($metadata['birth']["year"]) && !isset($metadata['birth']["age"])) {
- echo("Showing age warning\n");
- showWarning($member["display_name"] ?? $member["name"], $member["name"], $system);
- }
- }
- }
-}
-
if (count($fronters["members"]) > 1) {
echo("Creating context for 2 members\n");
$context = stream_context_create([
@@ -115,4 +93,4 @@ if ($system === "gdapd") {
}
echo("Sending to specific channel ($topic)\n");
-file_get_contents('https://' . $ntfy["server"] . '/' . $topic, false, $context); \ No newline at end of file
+file_get_contents('https://' . $ntfy["server"] . '/' . $topic, false, $context);