|
@@ -157,8 +157,8 @@ class Server {
|
|
const emails = await this.getLatestEmails(recipient, 24 * 60 * 60);
|
|
const emails = await this.getLatestEmails(recipient, 24 * 60 * 60);
|
|
console.time("renderJSON");
|
|
console.time("renderJSON");
|
|
const items = emails.map(({ id, email, receivedAt }) => {
|
|
const items = emails.map(({ id, email, receivedAt }) => {
|
|
- const author = email.from
|
|
+ const authors = email.from
|
|
- ? { name: `${email.from.name} <${email.from.address}>` }
|
|
+ ? [{ name: `${email.from.name} <${email.from.address}>` }]
|
|
: undefined;
|
|
: undefined;
|
|
return {
|
|
return {
|
|
id,
|
|
id,
|
|
@@ -166,7 +166,7 @@ class Server {
|
|
content_text: email.text ?? "<No Content>",
|
|
content_text: email.text ?? "<No Content>",
|
|
content_html: email.html,
|
|
content_html: email.html,
|
|
date_published: email.date ?? receivedAt.toString(),
|
|
date_published: email.date ?? receivedAt.toString(),
|
|
- author,
|
|
+ authors,
|
|
};
|
|
};
|
|
});
|
|
});
|
|
const json = JSON.stringify({
|
|
const json = JSON.stringify({
|