From d889ee9d16e86af17fc0b955e18905611e192f39 Mon Sep 17 00:00:00 2001 From: dangered wolf Date: Thu, 14 Jul 2022 22:15:07 -0400 Subject: [PATCH] Fixed animated GIFs not embedding --- src/status.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/status.ts b/src/status.ts index 435d3bf..1cb0e86 100644 --- a/src/status.ts +++ b/src/status.ts @@ -163,15 +163,16 @@ export const handleStatus = async ( headers.push(``); pushedCardType = true; } - } else if (media.type === 'video') { + } else if (media.type === 'video' || media.type === 'animated_gif') { headers.push(``); authorText = encodeURIComponent(text); // Find the variant with the highest bitrate let bestVariant = media.video_info?.variants?.reduce?.((a, b) => - (a.bitrate || 0) > (b.bitrate || 0) ? a : b + (a.bitrate ?? 0) > (b.bitrate ?? 0) ? a : b ); + headers.push( ``, ``,