Skip to content

Commit

Permalink
mu4e-draft: move the user-agent setting
Browse files Browse the repository at this point in the history
This updates commit 411407f and moves
the check to where we set the special headers.
  • Loading branch information
djcb committed Aug 28, 2024
1 parent fbe8c24 commit 797ca3e
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions mu4e/mu4e-draft.el
Original file line number Diff line number Diff line change
Expand Up @@ -565,13 +565,14 @@ PARENT is the parent message, if any."

(defun mu4e--prepare-draft-headers (compose-type)
"Add extra headers for message based on COMPOSE-TYPE."
(message-generate-headers
(seq-filter #'identity ;; ensure needed headers are generated.
`(From Subject Date Message-ID
,(when (memq compose-type '(reply forward)) 'References)
,(when (eq compose-type 'reply) 'In-Reply-To)
,(when message-newsreader 'User-Agent)
,(when message-user-organization 'Organization)))))
(let ((message-newsreader mu4e-user-agent-string))
(message-generate-headers
(seq-filter #'identity ;; ensure needed headers are generated.
`(From Subject Date Message-ID
,(when (memq compose-type '(reply forward)) 'References)
,(when (eq compose-type 'reply) 'In-Reply-To)
,(when message-newsreader 'User-Agent)
,(when message-user-organization 'Organization))))))

(defun mu4e--prepare-draft-buffer (compose-type parent)
"Prepare the current buffer as a draft-buffer.
Expand Down Expand Up @@ -723,8 +724,7 @@ Returns the new buffer."
;; compose-func
(let ((draft-buffer)
(oldframe (selected-frame))
(oldwinconf (current-window-configuration))
(message-newsreader mu4e-user-agent-string))
(oldwinconf (current-window-configuration)))
(with-temp-buffer
;; provide a temp buffer so the compose-func can do its thing
(setq draft-buffer (mu4e--validate-hidden-buffer (funcall compose-func)))
Expand Down

0 comments on commit 797ca3e

Please sign in to comment.