utility.presence: fix small image

This commit is contained in:
Cynthia Foxwell 2022-10-10 13:14:22 -06:00
parent 8f4b230326
commit 2eaeb5c583

View file

@ -816,11 +816,13 @@ presence.callback = async function (msg, line) {
const smallImage = await fetch(smallUrl)
.then((res) => res.arrayBuffer())
.then((b) => Buffer.from(b));
const smallImageSharp = sharp(smallImage).resize(20, 20);
const smallImageBuffer = sharp(smallImage)
.resize(20, 20)
.toBuffer();
presenceImage.composite([
{
input: smallImageSharp,
input: smallImageBuffer,
gravity: "southeast",
},
]);