This boils down to how to tell the user what's going on with the encryption status. I agree we shouldn't display encryption status until the review message screen for opportunistic encryption.
There are a few options at that point:
Case A: we can encrypt
- Push a Success message that we can encrypt
- Push a Normal message that we can encrypt
- Do nothing, the encryption status is shown with the headers anyways
- Create a config option for what should happen
Case B: we can't encrypt
- Push an Error message that we can't encrypt, and why (ie whose keys are missing?)
- Push a Normal message that we can't encrypt, and why
- Do nothing, the headers won't have an encryption status so the user can infer it's not encrypted
- Create a statusline Warning style, and push a Warning message that we can't encrypt, and why
- Create a config option for what should happen
I like A.1 and B.2 personally, but I also like A.3 and B.4. Open to input here, it's a pretty simple change so I can put it in once we have consensus.
My 2c:
Case A: 3
Case B: User-configurable between 1, 3, 4; 3 by default
Use-cases are:
- Does not care about encryption (default)
- Wants to encrypt opportunistically, but fine if not always
- Only wants to send encrypted emails
Tim Culverhouse referenced this ticket in commit 2af81a7.