Merge pull request #143 from SableClient/fix/broken-image-empty-body

Fix images with empty bodies display as broken.
This commit is contained in:
7w1 authored and GitHub committed 2026-03-10 10:35:54 -05:00
commit 42aa90f9bc
2 files changed
+7 -1

No files matched your search

+5
View File
@@ -0,0 +1,5 @@
---
sable: patch
---
Fix images without an empty body display as "Broken Message"
+2 -1
View File
@@ -120,8 +120,9 @@ function RenderMessageContentInternal({
);
const renderCaption = () => {
const hasCaption = content.body && content.body.trim().length > 0;
if (captionPosition === CaptionPosition.Hidden) return null;
if (content.filename && content.filename !== content.body) {
if (hasCaption && content.filename && content.filename !== content.body) {
if (captionPosition !== CaptionPosition.Inline)
return (
<MText