mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-25 02:09:05 +01:00
fix resolve of emoji's
This commit is contained in:
parent
748bbdf6a3
commit
8737e2fa71
@ -143,7 +143,6 @@ router.get("/apple-touch-icon.png", async (ctx) => {
|
||||
|
||||
router.get("/twemoji/(.*)", async (ctx) => {
|
||||
const path = ctx.path.replace("/twemoji/", "");
|
||||
|
||||
if (!path.match(/^[0-9a-f-]+\.svg$/)) {
|
||||
ctx.status = 404;
|
||||
return;
|
||||
@ -155,7 +154,7 @@ router.get("/twemoji/(.*)", async (ctx) => {
|
||||
);
|
||||
|
||||
await send(ctx as any, path, {
|
||||
root: `${_dirname}/../../../.yarn/unplugged/@discordapp-twemoji-npm-14.1.2-3097b95b97/dist/svg/`,
|
||||
root: `${_dirname}../../../../../../.yarn/unplugged/@discordapp-twemoji-npm-14.1.2-3097b95b97/node_modules/@discordapp/twemoji/dist/svg/`,
|
||||
maxage: 30 * DAY,
|
||||
});
|
||||
});
|
||||
@ -169,7 +168,7 @@ router.get("/twemoji-badge/(.*)", async (ctx) => {
|
||||
}
|
||||
|
||||
const mask = await sharp(
|
||||
`${_dirname}/../../../.yarn/unplugged/@discordapp-twemoji-npm-14.1.2-3097b95b97/dist/svg/${path.replace(
|
||||
`${_dirname}../../../../../../.yarn/unplugged/@discordapp-twemoji-npm-14.1.2-3097b95b97/node_modules/@discordapp/twemoji/dist/svg/${path.replace(
|
||||
".png",
|
||||
"",
|
||||
)}.svg`,
|
||||
|
Loading…
Reference in New Issue
Block a user