feat(flash-file): expose cover URL as flash_file.thumb

Incoming flash cards already carry a cover link; map it to
flash_file.data.thumb. Older cards without a cover leave it empty.

Fixes #367
This commit is contained in:
DrSmoothl committed 2026-08-14 14:00:18 +08:00
1 parent 8e9e228a0f
commit 925d9c0ac7
7 files changed
+48 -7

No files matched your search

@@ -1070,11 +1070,13 @@ function decodeFlashTransfer(md: MarkdownData): MessageElement | null {
fileName = md.summary.replace(/^\[QQ闪传\]\s*/, '').trim();
}
const thumbUrl = (ext?.thumbnail?.download?.downloadUrl ?? '').trim();
return {
type: 'flash_file',
filesetId,
fileName,
sceneType: card?.sceneType ?? 0,
...(thumbUrl ? { thumbUrl } : {}),
};
}