EmoteCloner: Fix recognizing animated emojis (#3027)

This commit is contained in:
sadan4 2024-11-23 21:07:46 -05:00 committed by GitHub
parent ac1b1d44f5
commit f22d0e14a4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -310,7 +310,8 @@ function buildMenuItem(type: "Emoji" | "Sticker", fetchData: () => Promisable<Om
} }
function isGifUrl(url: string) { function isGifUrl(url: string) {
return new URL(url).pathname.endsWith(".gif"); const u = new URL(url);
return u.pathname.endsWith(".gif") || u.searchParams.get("animated") === "true";
} }
const messageContextMenuPatch: NavContextMenuPatchCallback = (children, props) => { const messageContextMenuPatch: NavContextMenuPatchCallback = (children, props) => {