From: ueno Date: Tue, 25 Apr 2006 09:01:31 +0000 (+0000) Subject: Don't alter message-text if decryption fails. X-Git-Tag: riece-3_0_0~20 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=702de5f13d0a70d71eb040da6c34edadd17792bc;p=elisp%2Friece.git Don't alter message-text if decryption fails. --- diff --git a/lisp/riece-epg.el b/lisp/riece-epg.el index e2a5af9..542bcd2 100644 --- a/lisp/riece-epg.el +++ b/lisp/riece-epg.el @@ -78,20 +78,22 @@ (cons #'riece-epg-passphrase-callback-function (riece-message-target message))) (condition-case error - (setq string (epg-decrypt-string context - (base64-decode-string string))) + (riece-message-set-text + message + (concat + "[OpenPGP Decrypted:" + (decode-coding-string + (epg-decrypt-string context (base64-decode-string string)) + (if (consp coding-system) + (car coding-system) + coding-system)) + "]")) (error (if (setq entry (riece-identity-assoc (riece-message-target message) riece-epg-passphrase-alist)) (setcdr entry nil)) - (message "%s" (cdr error)))) - (riece-message-set-text - message - (decode-coding-string string - (if (consp coding-system) - (car coding-system) - coding-system)))))) + (message "%s" (cdr error))))))) message) (defun riece-epg-insinuate ()