Refractoring Stage 5 Completed channel-specific IPC validation
This commit is contained in:
+9
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user