Add email threading, snooze, bulk actions, scheduled send, stars, and attachments; v1.1.21

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
nmemmert
2026-07-28 16:29:24 -04:00
parent 57fe34ba47
commit ee7c783de8
6 changed files with 1008 additions and 336 deletions
+12
View File
@@ -1109,11 +1109,23 @@ function sanitizeLoadedContactSubmissions(value) {
messageType: normalizeMessageType(entry.messageType),
subscribe: entry.subscribe === true,
archived: entry.archived === true,
starred: entry.starred === true,
snoozedUntil: typeof entry.snoozedUntil === 'string' && !isNaN(Date.parse(entry.snoozedUntil)) ? entry.snoozedUntil : null,
threadId: typeof entry.threadId === 'string' && entry.threadId.trim() ? entry.threadId.trim() : randomUUID(),
emailStatus: normalizeContactEmailStatus(entry.emailStatus, entry.subscribe === true),
source: entry.source === 'inbound-email' || entry.source === 'download' ? entry.source : 'contact-form',
htmlBody: typeof entry.htmlBody === 'string' && entry.htmlBody.trim() ? entry.htmlBody : null,
inboundTo: typeof entry.inboundTo === 'string' ? entry.inboundTo : '',
messageId: typeof entry.messageId === 'string' ? entry.messageId : '',
attachments: Array.isArray(entry.attachments)
? entry.attachments.filter(a => a && typeof a.filename === 'string').slice(0, 10).map(a => ({
id: typeof a.id === 'string' ? a.id : randomUUID(),
filename: String(a.filename).slice(0, 255),
contentType: typeof a.contentType === 'string' ? a.contentType : 'application/octet-stream',
size: typeof a.size === 'number' ? a.size : 0,
data: typeof a.data === 'string' ? a.data : '',
}))
: [],
}))
}