diff options
author | RaindropsSys <contact@minteck.org> | 2023-05-24 21:59:15 +0200 |
---|---|---|
committer | RaindropsSys <contact@minteck.org> | 2023-05-24 21:59:15 +0200 |
commit | 81f4d57775853615633af0f3c8f7a1f139a64265 (patch) | |
tree | 6a25caca467d795bffb4edc4acc63860096ed4c4 /includes | |
parent | fe1a5abc59e622199027d35fd754d4893ad71133 (diff) | |
download | pluralconnect-81f4d57775853615633af0f3c8f7a1f139a64265.tar.gz pluralconnect-81f4d57775853615633af0f3c8f7a1f139a64265.tar.bz2 pluralconnect-81f4d57775853615633af0f3c8f7a1f139a64265.zip |
Updated 2 files (automated)
Diffstat (limited to 'includes')
-rw-r--r-- | includes/components/planner.inc | 4 | ||||
-rw-r--r-- | includes/external/matrix/index.js | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/includes/components/planner.inc b/includes/components/planner.inc index f07bd47..37687a3 100644 --- a/includes/components/planner.inc +++ b/includes/components/planner.inc @@ -521,9 +521,9 @@ function day($display, $diff): void { if ($diff < 0) $disabled = true; else $dis $relations = []; foreach (scoreOrderGlobal() as $member) { - $relations[$member['id']] = array_unique(array_map(function ($i) { + $relations[$member['id']] = array_values(array_unique(array_map(function ($i) { return explode("/", $i)[1]; - }, [...($member["_metadata"]["marefriends"] ?? []), ...($member["_metadata"]["sisters"] ?? []), ...($member["_metadata"]["caretakers"] ?? []), ...($member["_metadata"]["friends"] ?? []), ...($member["_metadata"]["sexfriends"] ?? [])])); + }, [...($member["_metadata"]["marefriends"] ?? []), ...($member["_metadata"]["sisters"] ?? []), ...($member["_metadata"]["caretakers"] ?? []), ...($member["_metadata"]["friends"] ?? []), ...($member["_metadata"]["sexfriends"] ?? [])]))); } echo(base64_encode(json_encode($relations))) ?>`)); diff --git a/includes/external/matrix/index.js b/includes/external/matrix/index.js index cd26a87..e699d0d 100644 --- a/includes/external/matrix/index.js +++ b/includes/external/matrix/index.js @@ -27,6 +27,7 @@ client.once("sync", async function (state, prevState, res) { let system = require('../../data/' + (user === "raindrops" ? "gdapd" : (user === "cloudburst" ? "ynmuc" : "other")) + "/general.json"); let fronters = require('../../data/' + (user === "raindrops" ? "gdapd" : (user === "cloudburst" ? "ynmuc" : "other")) + "/fronters.json"); + let members = require('../../data/' + (user === "raindrops" ? "gdapd" : (user === "cloudburst" ? "ynmuc" : "other")) + "/members.json"); console.log(system.name); console.log(fronters.members.length + " member(s) at front"); @@ -35,6 +36,9 @@ client.once("sync", async function (state, prevState, res) { let avatar1 = system.avatar_url; let avatar2 = null; + let fronter1 = null; + let fronter2 = null; + if (fronters.members.length === 1 || (fronters.members.length === 2 && (fronters.members[0].name === "scootaloo" && fronters.members[1].name === "rainbowdash"))) { name = fronters.members[0].display_name ?? fronters.members[0].name; avatar1 = fronters.members[0].avatar_url ?? avatar1; |