From 8c6e5119057154a530d34b2fb84b8394b5914cc0 Mon Sep 17 00:00:00 2001 From: Travis Ralston <travpc@gmail.com> Date: Mon, 9 Apr 2018 16:51:52 -0600 Subject: [PATCH] Use a thumbnailed image for sender avatars Discord uses 128px square images, so 512px should be fine for most cases. --- src/bot.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bot.ts b/src/bot.ts index 8ec1ad8..73c5c7d 100644 --- a/src/bot.ts +++ b/src/bot.ts @@ -167,7 +167,7 @@ export class DiscordBot { profile.displayname = profile.displayname || event.sender; if (profile.avatar_url) { const mxClient = this.bridge.getClientFactory().getClientAs(); - profile.avatar_url = mxClient.mxcUrlToHttp(profile.avatar_url); + profile.avatar_url = mxClient.mxcUrlToHttp(profile.avatar_url, 512, 512, 'scale'); } /* See issue #82 const isMarkdown = (event.content.format === "org.matrix.custom.html"); -- GitLab