MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / isGifMedia

Method isGifMedia

rev/rev.ts:381–392  ·  view source on GitHub ↗
(media: any)

Source from the content-addressed store, hash-verified

379 }
380 return null;
381 }
382
383 private isGifMedia(media: any): boolean {
384 if (media instanceof Api.MessageMediaDocument) {
385 const doc = media.document as Api.Document;
386 const fileName = this.getFileNameFromDocument(doc);
387 // .gif.mp4 按 GIF 处理(使用调色板优化)
388 if (fileName && fileName.toLowerCase().endsWith('.gif.mp4')) {
389 return true;
390 }
391 return (doc?.mimeType || '').toLowerCase().includes('gif');
392 }
393 return false;
394 }
395

Callers 1

prepareMediaPathsMethod · 0.95

Calls 1

Tested by

no test coverage detected