(content: string, useSpoiler: boolean)
| 651 | |
| 652 | return false; |
| 653 | } |
| 654 | |
| 655 | // 从消息中提取文件名 |
| 656 | function extractFileName(message: any): string | null { |
| 657 | if (!message.media) return null; |
| 658 | |
| 659 | // 忽略贴纸/表情包 |
| 660 | if (isStickerOrEmoji(message)) { |
| 661 | return null; |
| 662 | } |
| 663 | |
| 664 | // MessageMediaDocument(文件、图片等) |
| 665 | if (message.media.document) { |
| 666 | const doc = message.media.document; |
| 667 | // 从 attributes 中查找文件名 |
| 668 | if (doc.attributes && Array.isArray(doc.attributes)) { |
no outgoing calls
no test coverage detected