mirror of https://codeberg.org/cage/tinmop/
- added signature in the correct position when replying.
This commit is contained in:
parent
9229d4dd08
commit
b4f78df9b4
|
@ -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))))
|
||||||
|
|
|
@ -834,27 +834,28 @@ 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-signature (file)
|
||||||
|
(when-let ((signature (message-rendering-utils:signature)))
|
||||||
|
(with-open-file (stream
|
||||||
|
file
|
||||||
|
:direction :output
|
||||||
|
:element-type 'character
|
||||||
|
:if-exists :append)
|
||||||
|
(write-sequence signature stream))))
|
||||||
(add-body ()
|
(add-body ()
|
||||||
(let ((temp-file (fs:temporary-file))
|
(let ((temp-file (fs:temporary-file)))
|
||||||
(signature (message-rendering-utils:signature)))
|
|
||||||
(when signature
|
|
||||||
(with-open-file (stream
|
|
||||||
temp-file
|
|
||||||
:direction :output
|
|
||||||
:element-type 'character
|
|
||||||
:if-exists :supersede)
|
|
||||||
(write-sequence signature stream)))
|
|
||||||
(let ((reference-open-file (get-universal-time)))
|
|
||||||
(prepare-reply-body temp-file)
|
(prepare-reply-body temp-file)
|
||||||
(croatoan:end-screen)
|
(add-signature temp-file)
|
||||||
(os-utils:open-with-editor temp-file)
|
(let ((reference-open-file (get-universal-time)))
|
||||||
(when (and (> (fs:file-size temp-file)
|
(croatoan:end-screen)
|
||||||
0)
|
(os-utils:open-with-editor temp-file)
|
||||||
(> (fs:get-stat-mtime temp-file)
|
(when (and (> (fs:file-size temp-file)
|
||||||
reference-open-file))
|
0)
|
||||||
(let ((body (fs:slurp-file temp-file)))
|
(> (fs:get-stat-mtime temp-file)
|
||||||
(setf (sending-message:body *message-to-send*) body)
|
reference-open-file))
|
||||||
(add-subject)))))))
|
(let ((body (fs:slurp-file temp-file)))
|
||||||
|
(setf (sending-message:body *message-to-send*) body)
|
||||||
|
(add-subject)))))))
|
||||||
(add-body)))
|
(add-body)))
|
||||||
|
|
||||||
(defun reply-message ()
|
(defun reply-message ()
|
||||||
|
|
Loading…
Reference in New Issue