Skip to content
Extraits de code Groupes Projets
Non vérifiée Valider ea4525dd rédigé par Will Hunt's avatar Will Hunt Validation de GitHub
Parcourir les fichiers

Merge pull request #111 from turt2live/patch-1

Use a thumbnailed image for sender avatars
parents 3db3d473 a2c82d2a
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
screenshot.png

775 ko | W: | H:

screenshot.png

493 ko | W: | H:

screenshot.png
screenshot.png
screenshot.png
screenshot.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -18,6 +18,7 @@ import { Provisioner } from "./provisioner";
// messages get delayed from discord.
const MSG_PROCESS_DELAY = 750;
const MIN_PRESENCE_UPDATE_DELAY = 250;
const AVATAR_SIZE = 512; // matrix -> discord
// TODO: This is bad. We should be serving the icon from the own homeserver.
const MATRIX_ICON_URL = "https://matrix.org/_matrix/media/r0/download/matrix.org/mlxoESwIsTbJrfXyAAogrNxA";
class ChannelLookupResult {
......@@ -167,7 +168,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, AVATAR_SIZE, AVATAR_SIZE, "scale");
}
/* See issue #82
const isMarkdown = (event.content.format === "org.matrix.custom.html");
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter