courrier multi account restore compose

This commit is contained in:
alma 2025-04-28 21:25:56 +02:00
parent 8967b27f17
commit 6638347f92
2 changed files with 13 additions and 1 deletions

View File

@ -82,7 +82,13 @@ export default function EmailPanel({
// If content is already an object with html/text, use it directly
if (email.content && typeof email.content === 'object') {
console.log('EmailPanel: Using existing content object');
return email;
return {
...email,
content: {
text: email.content.text || '',
html: email.content.html || ''
}
};
}
// If content is a string, convert it to object format

View File

@ -134,6 +134,12 @@ export default function EmailPreview({ email, loading = false, onReply }: EmailP
content = email.html || email.text || '';
}
// If content is empty, try to get it from the formattedContent property
if (!content && email.formattedContent) {
console.log('EmailPreview: Using formattedContent property');
content = email.formattedContent;
}
console.log('EmailPreview: Content before sanitization:', content);
// Sanitize the content for display