MCPcopy Create free account
hub / github.com/FxEmbed/FxEmbed / shouldTranscodeGif

Function shouldTranscodeGif

src/helpers/giftranscode.ts:9–17  ·  view source on GitHub ↗
(c: Context)

Source from the content-addressed store, hash-verified

7 getGIFTranscodeDomainCore(twitterId, Constants.GIF_TRANSCODE_DOMAIN_LIST);
8
9export const shouldTranscodeGif = (c: Context) => {
10 return (
11 experimentCheck(Experiment.TRANSCODE_GIFS, !!Constants.GIF_TRANSCODE_DOMAIN_LIST) &&
12 !c.req.header('user-agent')?.includes('TelegramBot') &&
13 !Constants.OLD_EMBED_DOMAINS.includes(new URL(c.req.url).hostname) &&
14 !Constants.API_HOST_LIST.includes(new URL(c.req.url).hostname) &&
15 !Constants.BLUESKY_API_HOST_LIST.includes(new URL(c.req.url).hostname)
16 );
17};

Callers 4

renderVideoFunction · 0.90
handleStatusFunction · 0.90
handleActivityFunction · 0.90

Calls 1

experimentCheckFunction · 0.90

Tested by

no test coverage detected