Fix gifmaker urls (#1190)
* fix(gifMaker): fix discord tenor url suffix * fix(gifMaker): fix discord tenor stupid suffix
This commit is contained in:
parent
edf94a04e6
commit
31e6425693
1 changed files with 1 additions and 1 deletions
|
|
@ -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("/");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue