diff options
author | RaindropsSys <contact@minteck.org> | 2023-06-21 09:20:44 +0200 |
---|---|---|
committer | RaindropsSys <contact@minteck.org> | 2023-06-21 09:20:44 +0200 |
commit | 898a3d5af7d8bc4578786f1099d6fe092573d112 (patch) | |
tree | 98a5d54fe3fbccd98f9391c77e115be40c0c61f8 /includes/external/matrix/index.js | |
parent | 00572f011866cfdf7bb62e8ad0065d621b8d3f0b (diff) | |
download | pluralconnect-898a3d5af7d8bc4578786f1099d6fe092573d112.tar.gz pluralconnect-898a3d5af7d8bc4578786f1099d6fe092573d112.tar.bz2 pluralconnect-898a3d5af7d8bc4578786f1099d6fe092573d112.zip |
Updated 2 files (automated)
Diffstat (limited to 'includes/external/matrix/index.js')
-rw-r--r-- | includes/external/matrix/index.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/includes/external/matrix/index.js b/includes/external/matrix/index.js index e699d0d..8e6f0b8 100644 --- a/includes/external/matrix/index.js +++ b/includes/external/matrix/index.js @@ -108,6 +108,22 @@ client.once("sync", async function (state, prevState, res) { } }); + if (user === "raindrops" && name === "Hazy Stardawn") { + child_process.execSync("convert " + avatar1 + " -set colorspace Gray -separate -average /tmp/chm-" + user + ".webp"); + + let res2 = await client.uploadContent(fs.readFileSync("../../../assets/uploads/hazy.png")); + + await axios.put("https://chat.equestria.dev/_matrix/client/r0/rooms/" + encodeURIComponent(require('../../app.json')['matrix']['room']) + "/state/m.room.member/%40raindrops%3Aequestria.dev", { + avatar_url: res2.content_uri, + displayname: "Hazel Stardawn", + membership: "join" + }, { + headers: { + Authorization: "Bearer " + token + } + }); + } + process.exit(0); } else { console.log(state); |