Keyboard shortcuts for mail and a shortcut list, offline help and refresh on return, push alerts for new mail

This commit is contained in:
nmemmert committed 2026-10-23 09:32:56 -04:00
1 parent 93ae8f8840
commit 2c8afdef79
8 files changed
+71 -7

No files matched your search

+7 -1
View File
@@ -329,4 +329,10 @@ async function handle(req, res) {
} catch (e) { json(res, e.status || 400, { error: e.message }); }
}
module.exports = { enabled, outlookOn, handle, callback, secretStatus, recipients, textToHtml };
/** The newest messages in each connected account's Inbox (for the push alerts). One account that fails does not stop the others. */
async function newest() {
const out = [];
for (const a of accounts()) { try { const r = await withTimeout(providerOf(a).list(a, { folder: 'inbox', skip: 0, q: '' }), 15000); for (const m of r.items.slice(0, 10)) out.push({ id: a.id + ':' + m.id, subject: m.subject, from: (m.from && (m.from.name || m.from.address)) || '', read: !!m.read }); } catch { /* skipped this round */ } }
return out;
}
module.exports = { newest, enabled, outlookOn, handle, callback, secretStatus, recipients, textToHtml };