Skip to content

Commit

Permalink
fix: sender
Browse files Browse the repository at this point in the history
  • Loading branch information
ioanmo226 committed Oct 22, 2024
1 parent 7b68a39 commit be426dc
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion FlowCrypt/Controllers/Compose/ComposeViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,14 @@ final class ComposeViewController: TableNodeViewController {
.fetchList(isForceReload: false, for: appContext.user)
.filter { $0.verificationStatus == .accepted || $0.isDefault }

// Sender might be user's alias email, so we need to check if the sender is user's email address
// and set sender as email alias if applicable
var sender = appContext.user.email
if let inputSender = input.sender, sendAsList.contains(where: { $0.sendAsEmail == inputSender }) {
sender = inputSender
}
self.contextToSend = ComposeMessageContext(
sender: input.sender ?? appContext.user.email,
sender: sender,
subject: input.subject,
attachments: input.attachments
)
Expand Down

0 comments on commit be426dc

Please sign in to comment.