mirror of
https://github.com/abhinavxd/libredesk.git
synced 2026-09-21 01:53:20 +00:00
fix: display message content conditionally based on content type
Show `text` as is, render HTML with vue-letter
This commit is contained in:
@@ -31,7 +31,15 @@
|
||||
<hr class="mb-2" v-if="showEnvelope" />
|
||||
|
||||
<!-- Message Text -->
|
||||
<div
|
||||
v-if="message.content_type === 'text'"
|
||||
class="mb-1 native-html break-all whitespace-pre-wrap"
|
||||
:class="{ 'mb-3': message.attachments.length > 0 }"
|
||||
>
|
||||
{{ sanitizedMessageContent }}
|
||||
</div>
|
||||
<Letter
|
||||
v-else
|
||||
:html="sanitizedMessageContent"
|
||||
:allowedSchemas="['cid', 'https', 'http', 'mailto']"
|
||||
class="mb-1 native-html break-all"
|
||||
|
||||
Reference in New Issue
Block a user