]> git.eshelyaron.com Git - emacs.git/commitdiff
Re-encode message bodies with externalized attachments during FCC
authorEric Abrahamsen <eric@ericabrahamsen.net>
Sun, 21 Apr 2024 00:25:20 +0000 (17:25 -0700)
committerEshel Yaron <me@eshelyaron.com>
Mon, 22 Apr 2024 18:36:02 +0000 (20:36 +0200)
Bug#70338

* lisp/gnus/message.el (message-do-fcc): If the user has requested to
externalize attachments, we can't use the cached version of the message
body from sending. This mirrors an equivalent check for GCC in
`gnus-inews-do-gcc'.

(cherry picked from commit 3dfca6f9c7f4da512fff48cf6957c6492e2c0449)

lisp/gnus/message.el

index 979d2fecf567d03d099718a6cb12283e744c0a02..b2805774162f617f8590b34bafb546b088218e77 100644 (file)
@@ -5768,8 +5768,10 @@ The result is a fixnum."
       (with-temp-buffer
        (insert-buffer-substring buf)
        (message-clone-locals buf)
-       ;; Avoid re-doing things like GPG-encoding secret parts.
-       (if (not encoded-cache)
+       ;; Avoid re-doing things like GPG-encoding secret parts, unless
+       ;; the user has requested that attachments be externalized, in
+       ;; which case we have to re-encode the message body.
+       (if (or mml-externalize-attachments (not encoded-cache))
            (message-encode-message-body)
          (erase-buffer)
          (insert encoded-cache))