-
Notifications
You must be signed in to change notification settings - Fork 52
Open
Milestone
Description
For a refactor in another issue:
- this
sendablePwdMsgmethod could be removed formatSendablePwdMsgscould callconst emailIntroAndLinkBody = await this.formatPwdEncryptedMsgBodyLink(msgUrl);andreturn await SendableMsg.createPwdMsg(this.acctEmail, this.headers(newMsg), emailIntroAndLinkBody, messageBodyAsPgpMimeAttachmentsEncryptedForSender, { isDraft: this.isDraft, externalId });messageBodyAsPgpMimeAttachmentsEncryptedForSendercould be created only once, and reused in each cycle of the loop informatSendablePwdMsgs- to create
messageBodyAsPgpMimeMetaAttachmentsEncryptedForSenderyou could reuse most of existingsendablePwdMsgthat relates to creating this pgpmime attachments, and this new method could be calledencryptMessageBodyAsPgpMimeMetaAttachmentsand only sender pubkeys would be passed into it to createmessageBodyAsPgpMimeMetaAttachmentsEncryptedForSender
The point is that this encryption only needs to happen once per batch, not once per each pwd msg, and it only needs to use pubkeys of sender, not everybody's pubkeys.
Originally posted by @tomholub in #4284 (comment)
Metadata
Metadata
Assignees
Labels
No labels