Change/Fix: (ement-room--format-message-body) Ignore nil bodies

This shouldn't happen, but it did once, so let's protect against it
for now.
This commit is contained in:
Adam Porter 2021-07-29 04:05:10 -05:00
parent 591e486598
commit 2abc3a03db

View file

@ -1385,7 +1385,9 @@ If FORMATTED-P, return the formatted body content, when available."
(appendix (pcase msgtype
("m.image" (ement-room--format-m.image event))
(_ nil))))
(setf body (ement-room--linkify-urls body))
(when body
;; HACK: Once I got an error when body was nil, so let's avoid that.
(setf body (ement-room--linkify-urls body)))
(when appendix
(setf body (concat body " " appendix)))
body))