Refractoring Stage 5 Completed channel-specific IPC validation

This commit is contained in:
2026-10-16 17:26:51 +03:00
parent 88a8729f4f
commit 928e6dd62a
6 changed files with 205 additions and 6 deletions
+9 -1
View File
@@ -983,7 +983,15 @@ registerIpcHandler('mail:send', async (event, message) => {
const account = await readAccount();
if (!account) throw new Error('Add a mail account before sending.');
const pgpOptions = message?.pgp && (message.pgp.encrypt || message.pgp.sign) ? message.pgp : null;
const queuedMessage = { ...message, messageId: message?.messageId || `<${randomUUID()}@ep-mail.local>` };
const queuedMessage = {
to: message.to,
cc: message.cc,
subject: message.subject,
text: message.text,
displayName: message.displayName,
messageId: message.messageId || `<${randomUUID()}@ep-mail.local>`,
attachments: message.attachments
};
const attachments = normalizeOutgoingAttachments(message?.attachments);
queuedMessage.attachments = serializeOutgoingAttachments(attachments);
delete queuedMessage.pgp;