summaryrefslogtreecommitdiff
path: root/includes/external/matrix/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'includes/external/matrix/index.js')
-rw-r--r--includes/external/matrix/index.js16
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);