()
| 827 | const fileMappings: { fileName: string; telegramLink: string }[] = []; |
| 828 | for (const m of messageData) { |
| 829 | if (m.fileName) { |
| 830 | fileMappings.push({ fileName: m.fileName, telegramLink: m.telegramLink }); |
| 831 | } |
| 832 | } |
| 833 | |
| 834 | let result = messageTexts.join("\n"); |
| 835 | |
| 836 | if (urlMappings.length > 0) { |
| 837 | result += "\n\n--- 消息中包含的外部链接(资源URL - 来源消息链接)---\n"; |
| 838 | for (const mapping of urlMappings) { |
| 839 | result += `${mapping.url} - [查看原消息](${mapping.telegramLink})\n`; |
| 840 | } |
| 841 | } |
| 842 | |
| 843 | if (fileMappings.length > 0) { |
| 844 | result += "\n\n--- 消息中包含的附件(文件名 - 来源消息链接)---\n"; |
| 845 | for (const mapping of fileMappings) { |
| 846 | result += `${mapping.fileName} - [查看原消息](${mapping.telegramLink})\n`; |
| 847 | } |
| 848 | } |
| 849 | |
| 850 | return result; |
| 851 | } |
| 852 |
no test coverage detected