summaryrefslogtreecommitdiff
path: root/includes/external/signal
diff options
context:
space:
mode:
Diffstat (limited to 'includes/external/signal')
-rw-r--r--includes/external/signal/index.js10
1 files changed, 3 insertions, 7 deletions
diff --git a/includes/external/signal/index.js b/includes/external/signal/index.js
index 31de8a7..bcbb2b8 100644
--- a/includes/external/signal/index.js
+++ b/includes/external/signal/index.js
@@ -12,7 +12,6 @@ const child_process = require("child_process");
let system = require('../../data/' + (user === "raindrops" ? "gdapd" : (user === "Moonglow" ? "hrbom" : "other")) + "/general.json");
let fronters = require('../../data/' + (user === "raindrops" ? "gdapd" : (user === "Moonglow" ? "hrbom" : "other")) + "/fronters.json");
- let members = require('../../data/' + (user === "raindrops" ? "gdapd" : (user === "Moonglow" ? "hrbom" : "other")) + "/members.json");
console.log(system.name);
console.log(fronters.members.length + " member(s) at front");
@@ -21,13 +20,10 @@ const child_process = require("child_process");
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"))) {
+ if (fronters.members.length === 1) {
name = fronters.members[0].display_name ?? fronters.members[0].name;
avatar1 = fronters.members[0].avatar_url ?? avatar1;
- } else if (fronters.members.length >= 2 && !(fronters.members[0].name === "scootaloo" && fronters.members[1].name === "rainbowdash")) {
+ } else if (fronters.members.length >= 2) {
name = (fronters.members[0].display_name ?? fronters.members[0].name) + " and " + (fronters.members[1].display_name ?? fronters.members[1].name);
avatar1 = fronters.members[0].avatar_url ?? avatar1;
avatar2 = fronters.members[1].avatar_url ?? avatar2;
@@ -63,4 +59,4 @@ const child_process = require("child_process");
child_process.execFileSync("signal-cli", [ "-a", number, "updateAccount", "--device-name", "Ponycule to Signal integration (v" + new Date().toISOString().split("T")[0].replaceAll("-", ".") + ")" ]);
child_process.execFileSync("signal-cli", [ "-a", number, "sendSyncRequest" ]);
fs.unlinkSync("/tmp/chm-" + user + "-pfp-final");
-})(); \ No newline at end of file
+})();