x
This commit is contained in:
parent
da703a8836
commit
06e0d7fc9c
@ -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");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user