summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoritz Poldrack <git@moritz.sh>2022-06-22 12:19:38 +0200
committerRobin Jarry <robin@jarry.cc>2022-06-24 21:43:40 +0200
commit15a07e589201a3c748835747760a1b41e054ccc0 (patch)
tree0e8e3efb899b2baf876db2a6073422306d279ad3
parent8f9bb2b289af34581b43e0777b2376ab0617aecd (diff)
downloadaerc-15a07e589201a3c748835747760a1b41e054ccc0.zip
pgp: add note for encrypted messages that are not signed
Since there is a prominent checkmark for encrypted messages, it might not be entirely clear that the contents have not been signed. Signed-off-by: Moritz Poldrack <git@moritz.sh> Tested-by: Tim Culverhouse <tim@timculverhouse.com>
-rw-r--r--widgets/pgpinfo.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/widgets/pgpinfo.go b/widgets/pgpinfo.go
index 8dc0570..05e2053 100644
--- a/widgets/pgpinfo.go
+++ b/widgets/pgpinfo.go
@@ -44,12 +44,17 @@ func (p *PGPInfo) DrawSignature(ctx *ui.Context) {
}
func (p *PGPInfo) DrawEncryption(ctx *ui.Context, y int) {
+ warningStyle := p.uiConfig.GetStyle(config.STYLE_WARNING)
validStyle := p.uiConfig.GetStyle(config.STYLE_SUCCESS)
defaultStyle := p.uiConfig.GetStyle(config.STYLE_DEFAULT)
x := ctx.Printf(0, y, validStyle, "✓ Encrypted ")
x += ctx.Printf(x, y, defaultStyle,
"To %s (%8X) ", p.details.DecryptedWith, p.details.DecryptedWithKeyId)
+ if !p.details.IsSigned {
+ x += ctx.Printf(x, y, warningStyle,
+ "(message not signed!)")
+ }
}
func (p *PGPInfo) Draw(ctx *ui.Context) {