diff options
author | RaindropsSys <raindrops@equestria.dev> | 2024-03-29 22:05:35 +0100 |
---|---|---|
committer | RaindropsSys <raindrops@equestria.dev> | 2024-03-29 22:05:35 +0100 |
commit | 5860551daa0f60103ad24e93da29f401a653f144 (patch) | |
tree | 9ad97e04152a6edc11d5096c87880978df39086a /includes/external/signal | |
parent | a51979ad60074db84af78a06d30fcb888ccb0b03 (diff) | |
download | pluralconnect-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/external/signal')
-rw-r--r-- | includes/external/signal/index.js | 10 |
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 +})(); |