Conversation
CandelR
added this pull request to stack #583
September 11, 2026 13:41
CandelR
marked this pull request as ready for review
September 15, 2026 13:05
CandelR
force-pushed
the
feature/PB-6787-forward-2
branch
from
September 17, 2026 09:07
ac73409 to
9ec441b
Compare
|
xabg2
approved these changes
Sep 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Forward a message of the thread with its attachments
Summary
mailCrypto.service.ts: implementedencryptAndSendForward. It checks recipients, delivery mode and Bcc first, then takes the attachments out of the original, encrypts the body and every attachment for the new message, and sends it throughsendEmailwithinReplyToEmailIdso it stays in the thread. The decrypted files are deleted in afinally. The three send functions accept aSendProgresswhoseonStagereports downloading attachments, uploading attachments and sending.forwardAttachments.ts:materializeForwardedAttachmentsdownloads each attachment of the original one after another, decrypts it with the session key of that message and writes it to a uuid named temporary file. It refuses oversized attachments before downloading, throwsForwardedAttachmentsNotDecryptableErrorwhen the attachments are encrypted and the key is not on the device, and throwsForwardedAttachmentUnavailableErrornaming the file when one fails, deleting whatever was already written.discardMaterializedAttachmentsremoves the files once the send is overforwardBody.ts:forwardedSubjectadds theFwd:prefix unless the subject already has it.buildForwardedQuotequotes the original under an escaped From / Date / Subject / To / Cc header, keeping a markup body sanitised and a plain body with its line breaks, and returns the original text on its own.composeForwardedBodyplaces the user's note above the quote.previewOfForwardgives the mailbox list the note, or the original text when there is no note, never the headeremailBodyContent.ts: newplainTextFromHtmlturns a markup body into the text it displays, used for the preview of a forward.attachmentCrypto.ts:decryptAttachmentDatamoves here soforwardAttachments.tsandmailAttachment.service.tsshare it without importing each other throughmailCrypto.service.tsEmailDetailScreen: each message builds the forward params from its resolved body (subject, quote, attachments, whether they are encrypted and who sent it). Reply all is offered only when replying to all would add someone, and Forward is not offered for a message that could not be decryptedThreadMessageCard.tsx: Forward action next to Reply and Reply all, on the rightComposeEmailScreen: forward mode with the subject prefilled and the inherited attachments listed and removable. Every send shows a status line with its current stageForwardedQuote.tsx: folded block below the body, "Forwarded message from X", that opens to show the quote exactly as it will be sent, read-only, in a WebView with the same document and content security policy as the message detailerrors.ts/sendErrors.ts: forward errors and their user-facing messagestypes/mail.ts/navigation.ts:ForwardedAttachment,ForwardedQuote,OutgoingForward,ForwardComposeParams,SendStageandSendProgressuseEmailBodyHeightmoves tosrc/screens/mail/hooksso the detail and the compose screen share it, and forward, progress and error strings are added tostrings.tsin English and Spanish