Fix gifmaker urls (#1190)

* fix(gifMaker): fix discord tenor url suffix

* fix(gifMaker): fix discord tenor stupid suffix
This commit is contained in:
Leon135 2026-06-19 21:30:32 +02:00 • committed by GitHub
parent edf94a04e6
commit 31e6425693
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -86,7 +86,7 @@ export function ensureGifUrl(url: string): string {
const paths = parsed.pathname.split("/").filter(Boolean);
if (paths.length >= 2) {
const idSegment = paths[paths.length - 2];
paths[paths.length - 2] = idSegment.replace(/Po$/, "Ad");
paths[paths.length - 2] = idSegment.replace(/[PA].$/, "Ad");
paths[paths.length - 1] = "tenor.gif";
parsed.pathname = "/" + paths.join("/");
}