From bbbc1e86271c68340780958fa365647524b58870 Mon Sep 17 00:00:00 2001
From: salixor <salixor@pm.me>
Date: Thu, 26 Dec 2024 18:47:03 +0100
Subject: [PATCH] Woops, did not send an mxc

---
 src/matrixeventprocessor.ts | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/src/matrixeventprocessor.ts b/src/matrixeventprocessor.ts
index 27de0b1..f0dd984 100644
--- a/src/matrixeventprocessor.ts
+++ b/src/matrixeventprocessor.ts
@@ -38,8 +38,6 @@ const log = new Log("MatrixEventProcessor");
 const MaxFileSize = 8000000;
 const MIN_NAME_LENGTH = 2;
 const MAX_NAME_LENGTH = 32;
-const DISCORD_AVATAR_WIDTH = 128;
-const DISCORD_AVATAR_HEIGHT = 128;
 const AGE_LIMIT = 900000; // 15 * 60 * 1000
 const PROFILE_CACHE_LIFETIME = 900000;
 
@@ -524,13 +522,7 @@ export class MatrixEventProcessor {
         }
 
         if (profile?.avatar_url) {
-            avatarUrl = await this.bridge.botClient.mxcToHttpThumbnail(
-                profile.avatar_url,
-                DISCORD_AVATAR_WIDTH,
-                DISCORD_AVATAR_HEIGHT,
-                "scale",
-            );
-            const attachment = await this.bridge.botClient.downloadContent(avatarUrl);
+            const attachment = await this.bridge.botClient.downloadContent(profile.avatar_url);
             const base64 = `data:${attachment.contentType}attachment.data.toString('base64')`;
             avatarUrl = base64;
         }
-- 
GitLab