diff --git a/src/matrixeventprocessor.ts b/src/matrixeventprocessor.ts index 27de0b1f5d1ae157c42dc1c051519e7c8f9ce424..f0dd98446e2a7a5133ff62ba189a9dfe85664dbc 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; }