1
0
mirror of https://codeberg.org/cage/tinmop/ synced 2025-06-05 01:09:17 +02:00

- added signature in the correct position when replying.

This commit is contained in:
cage
2020-06-25 12:29:35 +02:00
parent 9229d4dd08
commit b4f78df9b4
2 changed files with 21 additions and 20 deletions

View File

@@ -277,4 +277,4 @@
(defun signature () (defun signature ()
(when-let ((signature-file (swconf:signature-file-path))) (when-let ((signature-file (swconf:signature-file-path)))
(format nil "-- ~%~a" (fs:slurp-file signature-file)))) (format nil "~%-- ~%~a" (fs:slurp-file signature-file))))

View File

@@ -834,18 +834,19 @@ Force the checking for new message in the thread the selected message belong."
(format stream "~a~%" (msg-utils:add-mention-prefix reply-username)) (format stream "~a~%" (msg-utils:add-mention-prefix reply-username))
(loop for line in quoted-lines do (loop for line in quoted-lines do
(format stream "~a~%" line)))))) (format stream "~a~%" line))))))
(add-body () (add-signature (file)
(let ((temp-file (fs:temporary-file)) (when-let ((signature (message-rendering-utils:signature)))
(signature (message-rendering-utils:signature)))
(when signature
(with-open-file (stream (with-open-file (stream
temp-file file
:direction :output :direction :output
:element-type 'character :element-type 'character
:if-exists :supersede) :if-exists :append)
(write-sequence signature stream))) (write-sequence signature stream))))
(let ((reference-open-file (get-universal-time))) (add-body ()
(let ((temp-file (fs:temporary-file)))
(prepare-reply-body temp-file) (prepare-reply-body temp-file)
(add-signature temp-file)
(let ((reference-open-file (get-universal-time)))
(croatoan:end-screen) (croatoan:end-screen)
(os-utils:open-with-editor temp-file) (os-utils:open-with-editor temp-file)
(when (and (> (fs:file-size temp-file) (when (and (> (fs:file-size temp-file)