mirror of
https://github.com/turt2live/matrix-dimension.git
synced 2024-10-01 01:05:53 -04:00
Scale, not crop, thumbnails for Telegram stickers
Fixes https://github.com/turt2live/matrix-dimension/issues/250
This commit is contained in:
parent
70c5471df7
commit
2ff5fa404c
@ -86,7 +86,7 @@ export class AdminStickerService {
|
||||
const mxc = await mx.upload(png, "image/png");
|
||||
const serverName = mxc.substring("mxc://".length).split("/")[0];
|
||||
const contentId = mxc.substring("mxc://".length).split("/")[1];
|
||||
const thumbMxc = await mx.uploadFromUrl(await mx.getThumbnailUrl(serverName, contentId, 512, 512, "crop", false), "image/png");
|
||||
const thumbMxc = await mx.uploadFromUrl(await mx.getThumbnailUrl(serverName, contentId, 512, 512, "scale", false), "image/png");
|
||||
|
||||
stickers.push(await Sticker.create({
|
||||
packId: pack.id,
|
||||
@ -120,4 +120,4 @@ export class AdminStickerService {
|
||||
Cache.for(CACHE_STICKERS).clear();
|
||||
return DimensionStickerService.packToMemory(pack);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user