This commit is contained in:
Haakam Aujla 2026-01-27 17:46:21 -08:00
parent da703a8836
commit 06e0d7fc9c

View File

@ -38,16 +38,15 @@ function formatMessageRecipients(msg: Message): string {
function formatMessage(msg: Message): string { function formatMessage(msg: Message): string {
const attachments = formatAttachments(msg.attachments); const attachments = formatAttachments(msg.attachments);
return [ const parts = [
`--- ${formatUtcDate(msg.createdAt)} ---`, `--- ${formatUtcDate(msg.timestamp)} ---`,
`From: ${msg.from}`, `From: ${msg.from}`,
formatMessageRecipients(msg), formatMessageRecipients(msg),
attachments, ];
"", if (attachments) parts.push(attachments);
extractMessageBody(msg), parts.push(""); // blank line before body
] parts.push(extractMessageBody(msg));
.filter(Boolean) return parts.join("\n");
.join("\n");
} }
/** /**