diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2022-06-13 16:46:14 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2022-06-13 16:46:14 +0200 |
commit | 5faa0bfdda012d049ddfa24f119ca33e16b026a7 (patch) | |
tree | 647226bd63de94846e4982e73053f9ab4672807d /lisp/gnus/message.el | |
parent | 5f5617727d91664bb3e4e559a1347bec86759846 (diff) | |
download | emacs-5faa0bfdda012d049ddfa24f119ca33e16b026a7.tar.gz emacs-5faa0bfdda012d049ddfa24f119ca33e16b026a7.tar.bz2 emacs-5faa0bfdda012d049ddfa24f119ca33e16b026a7.zip |
Massage In-Reply-To data in message-mail
* lisp/gnus/message.el (message-mail): Fix up Message-IDs from
Firefox (bug#55926).
Diffstat (limited to 'lisp/gnus/message.el')
-rw-r--r-- | lisp/gnus/message.el | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 5936d29c9d1..6973d8a86b2 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -7017,7 +7017,15 @@ is a function used to switch to and display the mail buffer." ;; https://lists.gnu.org/r/emacs-devel/2011-01/msg00337.html ;; We need to convert any string input, eg from rmail-start-mail. (dolist (h other-headers other-headers) - (if (stringp (car h)) (setcar h (intern (capitalize (car h))))))) + (when (stringp (car h)) + (setcar h (intern (capitalize (car h))))) + ;; Firefox sends us In-Reply-To headers that are Message-IDs + ;; without <> around them. Fix that. + (when (and (eq (car h) 'In-Reply-To) + ;; Looks like a Message-ID. + (string-match-p "\\`[^ @]+@[^ @]+\\'" (cdr h)) + (not (string-match-p "\\`<.*>\\'" (cdr h)))) + (setcdr h (concat "<" (cdr h) ">"))))) yank-action send-actions continue switch-function return-action)))) |