feat: Add preview for attachment messages (#1562)
Add preview for pending messages and attachments Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
committed by
GitHub
parent
db189e3c26
commit
3d2db95417
@@ -15,7 +15,7 @@
|
||||
v-for="message in unreadMessages"
|
||||
:key="message.id"
|
||||
:message-id="message.id"
|
||||
:message="message.content"
|
||||
:message="getMessageContent(message)"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
@@ -88,6 +88,16 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
getMessageContent(message) {
|
||||
const { attachments, content } = message;
|
||||
const hasAttachments = attachments && attachments.length;
|
||||
|
||||
if (content) return content;
|
||||
|
||||
if (hasAttachments) return `📑`;
|
||||
|
||||
return '';
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user