Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sosnovsky committed Jan 13, 2025
1 parent 8675877 commit a50cd5d
Show file tree
Hide file tree
Showing 3 changed files with 126 additions and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,12 @@ export class ComposeQuoteModule extends ViewModule<ComposeView> {
const decoded = await Mime.decode(Buf.fromBase64UrlStr(raw));
const headers = {
subject: decoded.subject,
date: String(decoded.headers.date),
date: decoded.headers.date as string,
from: decoded.from,
to: decoded.to,
cc: decoded.cc,
references: String(decoded.headers.references || ''),
'message-id': String(decoded.headers['message-id'] || ''),
references: (decoded.headers.references as string) || '',
'message-id': (decoded.headers['message-id'] as string) || '',
};
const message = decoded.rawSignedContent ? await Mime.process(Buf.fromUtfStr(decoded.rawSignedContent)) : Mime.processDecoded(decoded);
const readableBlockTypes = ['encryptedMsg', 'plainText', 'plainHtml', 'signedMsg'];
Expand Down
2 changes: 1 addition & 1 deletion extension/js/common/core/mime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ export class Mime {
}
}
const headers = Mime.headerGetAddress(mimeContent, ['from', 'to', 'cc', 'bcc']);
mimeContent.subject = String(mimeContent.subject || mimeContent.headers.subject || '');
mimeContent.subject = mimeContent.subject || (mimeContent.headers.subject as string) || '';
mimeContent = Object.assign(mimeContent, headers);
resolve(mimeContent);
} catch (e) {
Expand Down
Loading

0 comments on commit a50cd5d

Please sign in to comment.