Skip to content

Commit 16fbfa7

Browse files
committed
fix: display message content conditionally based on content type
Show `text` as is, render HTML with vue-letter
1 parent b8da96c commit 16fbfa7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

frontend/src/features/conversation/message/ContactMessageBubble.vue

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,15 @@
3131
<hr class="mb-2" v-if="showEnvelope" />
3232

3333
<!-- Message Text -->
34+
<div
35+
v-if="message.content_type === 'text'"
36+
class="mb-1 native-html break-all whitespace-pre-wrap"
37+
:class="{ 'mb-3': message.attachments.length > 0 }"
38+
>
39+
{{ sanitizedMessageContent }}
40+
</div>
3441
<Letter
42+
v-else
3543
:html="sanitizedMessageContent"
3644
:allowedSchemas="['cid', 'https', 'http', 'mailto']"
3745
class="mb-1 native-html break-all"

0 commit comments

Comments
 (0)