emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/ement 8a354b52d8: Fix: (ement--add-reply) Use formatted


From: ELPA Syncer
Subject: [elpa] externals/ement 8a354b52d8: Fix: (ement--add-reply) Use formatted_body when available
Date: Mon, 7 Nov 2022 16:57:45 -0500 (EST)

branch: externals/ement
commit 8a354b52d8d71f952c10c6ba355547ce9b86bd6a
Author: Adam Porter <adam@alphapapa.net>
Commit: Adam Porter <adam@alphapapa.net>

    Fix: (ement--add-reply) Use formatted_body when available
---
 README.org   | 3 +++
 ement-lib.el | 3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/README.org b/README.org
index 014b443005..c73fe2c86c 100644
--- a/README.org
+++ b/README.org
@@ -295,6 +295,9 @@ Note that, while ~matrix-client~ remains usable, and 
probably will for some time
 *Changes*
 + When selecting a room to view with completion, don't offer spaces.
 
+*Fixes*
++ Use of send-message filter when replying.
+
 ** 0.4.1
 
 *Fixes*
diff --git a/ement-lib.el b/ement-lib.el
index fc45a9bff3..47c293b007 100644
--- a/ement-lib.el
+++ b/ement-lib.el
@@ -1025,6 +1025,7 @@ DATA is an unsent message event's data alist."
                (replying-to-sender-name (ement--user-displayname-in ement-room 
replying-to-sender))
                (quote-string (format "> <%s> %s\n\n" replying-to-sender-name 
replying-to-body))
                (reply-body (alist-get "body" data nil nil #'string=))
+               (reply-formatted-body (alist-get "formatted_body" data nil nil 
#'string=))
                (reply-body-with-quote (concat quote-string reply-body))
                (reply-formatted-body-with-quote
                 (format "<mx-reply>
@@ -1041,7 +1042,7 @@ DATA is an unsent message event's data alist."
                         ;; might hope: there's `web-mode-html-entities' and 
`org-entities'.  See also
                         ;; 
<https://emacs.stackexchange.com/questions/8166/encode-non-html-characters-to-html-equivalent>.
                         (or replying-to-formatted-body replying-to-body)
-                        reply-body)))
+                        (or reply-formatted-body reply-body))))
     ;; NOTE: map-elt doesn't work with string keys, so we use `alist-get'.
     (setf (alist-get "body" data nil nil #'string=) reply-body-with-quote
           (alist-get "formatted_body" data nil nil #'string=) 
reply-formatted-body-with-quote



reply via email to

[Prev in Thread] Current Thread [Next in Thread]