about summary refs log tree commit diff stats
path: root/commands/msg
diff options
context:
space:
mode:
authorRay Ganardi <ray@ganardi.xyz>2020-05-19 13:06:46 +0200
committerDrew DeVault <sir@cmpwn.com>2020-05-25 09:30:20 -0400
commit58db517c8d79c7fd8897d8ab5d5cf9c2de67a071 (patch)
tree775b2d74bda2ea10795b9dffa60afb66c36a90b8 /commands/msg
parent83e7c7661dfe42e75641d764d713d144c2d7c6ce (diff)
downloadaerc-58db517c8d79c7fd8897d8ab5d5cf9c2de67a071.tar.gz
pgp: fail gracefully from email decryption
Aerc panics when there's an error on email decryption.
Instead, an error message should be shown.
Diffstat (limited to 'commands/msg')
-rw-r--r--commands/msg/delete.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/commands/msg/delete.go b/commands/msg/delete.go
index 313e3ea..4bda8b9 100644
--- a/commands/msg/delete.go
+++ b/commands/msg/delete.go
@@ -66,7 +66,11 @@ func (Delete) Execute(aerc *widgets.Aerc, args []string) error {
 				return nil
 			}
 			lib.NewMessageStoreView(next, store, aerc.DecryptKeys,
-				func(view lib.MessageView) {
+				func(view lib.MessageView, err error) {
+					if err != nil {
+						aerc.PushError(err.Error())
+						return
+					}
 					nextMv := widgets.NewMessageViewer(acct, aerc.Config(), view)
 					aerc.ReplaceTab(mv, nextMv, next.Envelope.Subject)
 				})
' href='#n158'>158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224